Skip to content

Instantly share code, notes, and snippets.

@joemccann
Created November 30, 2011 18:05
Show Gist options
  • Save joemccann/1410062 to your computer and use it in GitHub Desktop.
Save joemccann/1410062 to your computer and use it in GitHub Desktop.
Monit script for bouncy
check process node with pidfile /etc/init.d/bouncy.node.pid
start "/etc/init.d/yourApp start"
stop "/etc/init.d/yourApp stop"
if failed host 127.0.0.1 port 80
then restart
@joemccann
Copy link
Author

The pid file for bouncy, in my case, is stored at the path /etc/init.d/bouncy.node.pid so just substitute the path to the bouncy pid file if it is not located there.

I capture the bouncy pid file with the following:

bouncy /path/to/your/routes.json 80 &
echo $! > /etc/init.d/bouncy.node.pid

@joemccann
Copy link
Author

Also, I'm not setting a polling interval here as it is set in my /etc/monit/monitrc file:

set daemon 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment