sshd reconfigure only if needed

pull/40/head
TomasM 2017-11-14 09:17:36 -05:00
parent 9afc5451af
commit e9076adc5b
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ ConditionPathExists=!/etc/ssh/sshd_not_to_be_run
[Service]
EnvironmentFile=-/etc/default/ssh
ExecStartPre=/usr/sbin/dpkg-reconfigure openssh-server
ExecStartPre=-/bin/sh -c 'if ! ls /etc/ssh/ssh_host_* >/dev/null 2>&1; then /usr/sbin/dpkg-reconfigure openssh-server; fi'
ExecStart=/usr/sbin/sshd -D $SSHD_OPTS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process