#!upstart
#noobaalocalservice upstart configuration script

description "noobaalocalservice startup script for upstart based initialization."

start on runlevel [2345]
stop on shutdown
respawn

env LOGFILE="/var/log/noobaalocalservice.log"

env MIN_UPTIME="5000"
env SPIN_SLEEP_TIME="2000"

env KILL_SIGNAL="SIGTERM"

env KILLWAITTIME=5000

chdir /usr/local/noobaa
env PATH=/usr/local/noobaa:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

script
  exec /usr/local/noobaa/node /usr/local/noobaa/src/agent/agent_wrap.js
end script

post-start script
  echo "noobaalocalservice started"
end script
