14
services/sshd
Executable file
14
services/sshd
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env ssm
|
||||
|
||||
cfg_sshd_cfgdir='/etc/ssh'
|
||||
|
||||
service_respawn=true
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user