Monit linux examples6/19/2023 ![]() ![]() Monit has no connection between pid-file and binary. The biggest flaw with this approach would be the possible reuse of pids. If 3 restarts within 5 cycles then unmonitor Stop program = "/monit/MyProgram-kill" as uid MyNonRootUserHere Start program = "/monit/MyProgram-daemonize" as uid myNonRootUserHere You can use check process then: check process MyProgram pidfile "/tmp/MyProgram.pid" I used kill -SIGTERM, because kill -SIGKILL or kill -9 are evil ) You might have to adjust this.I used /tmp/ instead of /run for permission reasons. ![]()
0 Comments
Leave a Reply. |