diff --git a/setup_monit.php b/setup_monit.php index 3744a63e5cc08ddb7fcec0997daf189bfb797942..5e4d275d068c9470ca54c410c4abe0f585caa117 100644 --- a/setup_monit.php +++ b/setup_monit.php @@ -253,8 +253,8 @@ check file fail2ban_log with path /var/log/fail2ban.log if ($service == 'sshd') { $conf='check process sshd with pidfile /var/run/sshd.pid group sshd - start program = "/etc/init.d/ssh start" - stop program = "/etc/init.d/ssh stop" + start program = "/usr/bin/systemctl start ssh" + stop program = "/usr/bin/systemctl stop ssh" if failed host localhost port 22 with proto ssh then restart if 5 restarts with 5 cycles then timeout depend on sshd_bin @@ -500,4 +500,4 @@ foreach ($services as $confFile) { shell_exec('systemctl restart monit'); print('[INFO] Your Monit admin password is ' . $monitpw . "\n"); -?> \ No newline at end of file +?>