sshd reconfigure only if needed
This commit is contained in:
@@ -5,7 +5,7 @@ ConditionPathExists=!/etc/ssh/sshd_not_to_be_run
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=-/etc/default/ssh
|
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
|
ExecStart=/usr/sbin/sshd -D $SSHD_OPTS
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
KillMode=process
|
KillMode=process
|
||||||
|
|||||||
Reference in New Issue
Block a user