Skip to content

Instantly share code, notes, and snippets.

@danmichaelo
Forked from qharlie/gist:5271721
Last active August 29, 2015 13:56
Show Gist options
  • Select an option

  • Save danmichaelo/8915142 to your computer and use it in GitHub Desktop.

Select an option

Save danmichaelo/8915142 to your computer and use it in GitHub Desktop.
blx upstart script
#!upstart
description "blx bibsys server"
author "Dan Michael"
env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
env PROJECT=/data/blx/server
console output
setuid www-data
respawn
start on net-device-up IFACE=eth0
#start on filesystem and started networking
stop on shutdown
script
exec 2>>$PROJECT/console.log
set -x
echo "Starting blx..."
chdir $PROJECT
exec node server.js >> server.log
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment