slightly change systemd units logic - use sshd-keygen.service (#1066615)

This commit is contained in:
Petr Lautrbach 2014-06-03 17:47:56 +02:00
parent fb6f390a78
commit d1c2eb285e
3 changed files with 6 additions and 3 deletions

View File

@ -2,7 +2,10 @@
Description=OpenSSH Server Key Generation
ConditionPathExists=|!/etc/ssh/ssh_host_rsa_key
ConditionPathExists=|!/etc/ssh/ssh_host_ecdsa_key
ConditionPathExists=|!/etc/ssh/ssh_host_ed25519_key
PartOf=sshd.service sshd.socket
[Service]
ExecStart=/usr/sbin/sshd-keygen
Type=oneshot
RemainAfterExit=yes

View File

@ -1,10 +1,10 @@
[Unit]
Description=OpenSSH server daemon
After=syslog.target network.target auditd.service
After=network.target sshd-keygen.service
Wants=sshd-keygen.service
[Service]
EnvironmentFile=/etc/sysconfig/sshd
ExecStartPre=/usr/sbin/sshd-keygen
ExecStart=/usr/sbin/sshd -D $OPTIONS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process

View File

@ -1,7 +1,7 @@
[Unit]
Description=OpenSSH per-connection server daemon
Wants=sshd-keygen.service
After=auditd.service sshd-keygen.service
After=sshd-keygen.service
[Service]
EnvironmentFile=-/etc/sysconfig/sshd