diff --git a/examples/mailman_connector.conf b/examples/mailman_connector.conf new file mode 100644 index 0000000..5cb7b50 --- /dev/null +++ b/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 " + +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 +