Skip to content

Commit

Permalink
Added upstart conf to scritps
Browse files Browse the repository at this point in the history
  • Loading branch information
aalonsog committed Oct 16, 2015
1 parent 29788f4 commit 3c25abe
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions extras/scripts/pep-proxy.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
description "PEP Proxy"
author "Alvaro Alonso"

start on started networking
stop on shutdown

script
export HOME="/ubuntu"

echo $$ > /var/run/pep-proxy.pid
exec sudo /usr/bin/node /home/ubuntu/fiware-pep-proxy/server.js >> /var/log/pep-proxy.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/pep-proxy.log
end script

pre-stop script
rm /var/run/pep-proxy.pid
echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Stopping" >> /var/log/pep-proxy.log
end script

0 comments on commit 3c25abe

Please sign in to comment.