Last active
October 11, 2015 18:38
-
-
Save truedat101/3902091 to your computer and use it in GitHub Desktop.
Graylog2 upstart for webrick
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/init/graylog-webrick.conf | |
# attribution: | |
# http://blog.joshsoftware.com/2012/02/14/upstart-scripts-in-ubuntu/ | |
# | |
# More on upstart for dummies: http://upstart.ubuntu.com/getting-started.html | |
# | |
description "graylog2 webrick service" | |
author "foo" | |
# used to be: start on startup | |
# until we found some mounts weren't ready yet while booting: | |
#start on started mountall | |
# If network interface is wireless | |
start on (local-filesystems and net-device-up IFACE=wlan0) | |
# If network interface is Ethernet uncomment below line and comment above line | |
#start on (local-filesystems and net-device-up IFACE=eth0) | |
stop on shutdown | |
# Automatically Respawn: | |
respawn | |
respawn limit 99 5 | |
script | |
# export HOME="/home/siva/work/myproject" | |
# exec /usr/local/bin/node $HOME/node/notify.js 13002 >> /var/log/node.log 2>&1 | |
# exec su -c " " graylog2-web | |
# exec sudo -u graylog2-web -i && script/rails server -e production >> /var/log/webrick.log 2>&1 | |
end script | |
exec sudo -i -u graylog2-web script/rails server -e production >> ./webrick.log 2>&1 | |
post-start script | |
# Optionally put a script here that will notify you service has (re)started | |
# /root/bin/hoptoad.sh "node.js has started!" | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment