ssm-services/services/sshd
fbt eea04dff95 Be more conservative about respawn
Signed-off-by: fbt <fbt@fleshless.org>
2018-03-08 02:34:49 +03:00

15 lines
248 B
Plaintext
Executable File

#!/usr/bin/env ssm
cfg_sshd_cfgdir='/etc/ssh'
service_respawn=always
service_command=( /usr/bin/sshd -D -f "$cfg_sshd_cfgdir/sshd_config" )
depends_ready=( znet )
pre_start() {
if ! [[ -e "/etc/ssh/ssh_host_key" ]]; then
ssh-keygen -A
fi
}