#!upstart description "start shovel server" start on startup stop on shutdown script export HOME="/root" echo $$ > /var/run/shovel.pid echo Starting shovel service chdir /var/Shovel/ exec /usr/bin/nodejs main.js >> /var/log/shovel.log 2>&1 end script pre-start script echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Starting" >> /var/log/shovel.log end script pre-stop script rm /var/run/shovel.pid echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Stopping" >> /var/log/shovel.log end script