Skip to content

Instantly share code, notes, and snippets.

@truedat101 truedat101/gist:3902091
Last active Oct 11, 2015

Embed
What would you like to do?
Graylog2 upstart for webrick
# /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
You can’t perform that action at this time.