Browse Source

Upstart example with monit stanza.

devel
Jonathan Rosenbaum 9 years ago
parent
commit
277bad2d07
  1. 29
      examples/mailman_connector.conf

29
examples/mailman_connector.conf

@ -0,0 +1,29 @@
# mailman_connector upstart script
# This is an example of an upstart script used to start/stop
# the mailman connector. Node is provided by nvm in a home directory, and
# a pid file is kept so that monitoring daemons can watch the program.
# Respawn is used as an additional technique.
#
# Stanza from Monit that monitors pid
#
# check process nodejs
# with pidfile /var/run/mailman_connector.pid
# start = "/sbin/start nodejs"
# stop = "/sbin/stop nodejs"
description "Subscribe/unsubscribe people to mailman as requested from YBDB."
author "Jonathan Rosenbaum <gnuser@gmail.com>"
start on runlevel [2345]
stop on runlevel [016]
env NVM_DIR="/home/ps/.nvm"
exec . $NVM_DIR/nvm.sh
respawn
exec nvm use 0.12
exec start-stop-daemon --start --make-pidfile --pidfile /var/run/mailman_connector.pid --exec /home/osenergy/.nvm/versions/v0.12.0/bin/node /home/ps/node.js/mailman_connector.js 9987
Loading…
Cancel
Save