slightly change systemd units logic - use sshd-keygen.service (#1066615)
This commit is contained in:
parent
fb6f390a78
commit
d1c2eb285e
@ -2,7 +2,10 @@
|
|||||||
Description=OpenSSH Server Key Generation
|
Description=OpenSSH Server Key Generation
|
||||||
ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key
|
ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key
|
||||||
ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key
|
ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key
|
||||||
|
ConditionPathExists=|!/etc/ssh/ssh_host_ed25519_key
|
||||||
|
PartOf=sshd.service sshd.socket
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/sbin/sshd-keygen
|
ExecStart=/usr/sbin/sshd-keygen
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=OpenSSH server daemon
|
Description=OpenSSH server daemon
|
||||||
After=syslog.target network.target auditd.service
|
After=network.target sshd-keygen.service
|
||||||
|
Wants=sshd-keygen.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=/etc/sysconfig/sshd
|
EnvironmentFile=/etc/sysconfig/sshd
|
||||||
ExecStartPre=/usr/sbin/sshd-keygen
|
|
||||||
ExecStart=/usr/sbin/sshd -D $OPTIONS
|
ExecStart=/usr/sbin/sshd -D $OPTIONS
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
KillMode=process
|
KillMode=process
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=OpenSSH per-connection server daemon
|
Description=OpenSSH per-connection server daemon
|
||||||
Wants=sshd-keygen.service
|
Wants=sshd-keygen.service
|
||||||
After=auditd.service sshd-keygen.service
|
After=sshd-keygen.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=-/etc/sysconfig/sshd
|
EnvironmentFile=-/etc/sysconfig/sshd
|
||||||
|
Loading…
Reference in New Issue
Block a user