2013-09-29 03:32:39 +04:00
|
|
|
#!/usr/bin/env watchman
|
|
|
|
|
|
|
|
cfg_sshd_cfgdir='/etc/ssh'
|
|
|
|
|
2014-07-03 11:05:52 +04:00
|
|
|
service_respawn=true
|
2013-09-29 03:32:39 +04:00
|
|
|
service_command='/bin/sshd'
|
2014-07-03 11:05:52 +04:00
|
|
|
service_args="-D -f $cfg_sshd_cfgdir/sshd_config"
|
2013-09-29 03:32:39 +04:00
|
|
|
|
|
|
|
sshd_genkeys() {
|
|
|
|
[[ -e "/etc/ssh/ssh_host_key" ]] || { ssh-keygen -A; }
|
|
|
|
}
|
2014-04-04 15:40:00 +04:00
|
|
|
|
2014-07-28 07:52:32 +04:00
|
|
|
start() {
|
|
|
|
sshd_genkeys
|
|
|
|
watchman.start
|
|
|
|
}
|