diff --git a/manifests/init.pp b/manifests/init.pp index 0661be7..d810afc 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -46,6 +46,7 @@ recurse => true, purge => true, } + monit::sshdcheck { "sshdcheck_${fqdn}": } } define monit::options ($interval, $mailserver, $email, $http_address, $http_allow, $http_user, $http_password) { diff --git a/templates/monitrc.erb b/templates/monitrc.erb index 331896d..ced5d7a 100644 --- a/templates/monitrc.erb +++ b/templates/monitrc.erb @@ -7,11 +7,5 @@ # log to syslog set logfile syslog facility log_daemon -# always monitor ssh -check process sshd with pidfile /var/run/sshd.pid - start program = "/etc/init.d/ssh start" - stop program = "/etc/init.d/ssh stop" - if failed port 22 protocol ssh then restart - # include additional config files include /etc/monit/conf.d/*