2017-07-13 13:09:42 +00:00
|
|
|
#!/usr/bin/env ssm
|
2013-09-28 23:32:39 +00:00
|
|
|
|
|
|
|
cfg_sshd_cfgdir='/etc/ssh'
|
|
|
|
|
2014-07-03 07:05:52 +00:00
|
|
|
service_respawn=true
|
2015-06-18 09:38:49 +00:00
|
|
|
service_command='/usr/bin/sshd'
|
2015-09-04 13:47:37 +00:00
|
|
|
service_args=( -D -f "$cfg_sshd_cfgdir/sshd_config" )
|
2013-09-28 23:32:39 +00:00
|
|
|
|
2017-07-13 13:09:42 +00:00
|
|
|
depends_ready=( znet )
|
|
|
|
|
2015-09-04 13:47:37 +00:00
|
|
|
pre_start() {
|
2017-07-13 13:09:42 +00:00
|
|
|
if ! [[ -e "/etc/ssh/ssh_host_key" ]]; then
|
|
|
|
ssh-keygen -A
|
|
|
|
fi
|
2013-09-28 23:32:39 +00:00
|
|
|
}
|