Quote:
Originally Posted by Ackis
Could you share your script with me please?
|
This script is run by monit under the following conditions:
Code:
check process calibre-server with pidfile /var/run/calibre-server.pid
start program = "/root/mon/calibre-server.sh start"
stop program = "/root/mon/calibre-server.sh stop"
alert [elided-email-address] only on { timeout, nonexist }
check file metadata.db with path /home/dropbox/Dropbox/[elided]/metadata.db
if changed timestamp
then exec "/root/mon/calibre-server.sh restart"
The calibre-server script is attached. Although it looks like an init.d script and can actually run as one, instead I run it only through monit. I added the .txt extension so that I could attach the file.