2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2024-11-22 09:49:50 +00:00

contrib/init-scripts/fhem.monit: add example for SONOS subprocess

git-svn-id: https://svn.fhem.de/fhem/trunk@16541 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2018-04-02 21:28:28 +00:00
parent 5d9f818716
commit 5f8a001731

View File

@ -16,6 +16,12 @@ set httpd port 2812 and
allow localhost
allow admin:monit
# check process 00_SONOS.pm matching 00_SONOS.pm
# start = "/bin/sh -c 'cd /opt/fhem/FHEM; /usr/local/bin/perl 00_SONOS.pm 4711 &'" as uid "fhem" and gid "fhem"
# stop = "/bin/sh -c '/bin/pkill -f 00_SONOS.pm'" as uid "fhem" and gid "fhem"
# if cpu usage > 90% for 10 cycles then restart
# if 5 restarts with 5 cycles then timeout
check process fhem.pl with pidfile /var/run/fhem/fhem.pid
start = "/bin/sh -c 'cd /opt/fhem; /usr/local/bin/perl fhem.pl fhem.cfg'" as uid "fhem" and gid "fhem"
stop = "/bin/sh -c 'cd /opt/fhem; /usr/local/bin/perl fhem.pl 7072 shutdown || kill -9 `cat /var/run/fhem/fhem.pid`'" as uid "fhem" and gid "fhem"