Permalink
Browse files

Upstart script.

  • Loading branch information...
Bad boy writing code directly on the server
Bad boy writing code directly on the server committed Mar 19, 2015
1 parent 656c8ba commit 6f3a367ea1793a668346cae65f4bbdc5cc833c65
Showing with 21 additions and 0 deletions.
  1. +21 −0 server/upstart-package-quality.conf
@@ -0,0 +1,21 @@
+#!upstart
+description "Package quality server"
+author "Diego Lafuente <dlafuente@tuitravel-ad.com>"
+
+start on local-filesystems and net-device-up IFACE=eth0
+stop on shutdown
+
+respawn
+respawn limit 60 1
+
+env HOME_FOLDER=/home/ubuntu
+env BASE_USER=ubuntu
+
+kill timeout 20
+
+script
+ LOG_FILE=$HOME_FOLDER/log/package-quality-server.log
+ cd $HOME_FOLDER/package-quality
+ exec sudo -u $BASE_USER node bin/app.js >> $LOG_FILE 2>&1
+end script
+

0 comments on commit 6f3a367

Please sign in to comment.