View Single Post
Old 07-14-2014, 01:43 PM   #7
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,509
Karma: 8065348
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Ackis View Post
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.
Attached Files
File Type: txt calibre-server.sh.txt (3.6 KB, 210 views)
chaley is offline   Reply With Quote