CopyPastehas never been so tasty!

upstart

by anonymous

  • 0
  • 0
76 views

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
#!upstart
description "node.js GISXL"
author      "mattia"
 
start on startup
stop on shutdown
 
script
    #export HOME="/home/mat/Progetti/GISDesktop"
    echo $$ > /var/run/nodejs_gisxl.pid
    cd /home/mat/Progetti/GISXL
    exec sudo -u mat /usr/bin/node socket.js >> /var/log/gisxl.sys.log 2>&1
end script
 
pre-start script
    # Date format same as (new Date()).toISOString() for consistency
    echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Starting" >> /var/log/gisxl.sys.log
end script
 
pre-stop script
    rm /var/run/nodejs_gisxl.pid
    echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Stopping" >> /var/log/gisxl.sys.log
end script