bigbluebutton-Github/bbb-webhooks/config/upstart-bbb-webhooks.conf

35 lines
837 B
Plaintext
Raw Normal View History

# bbb-webhooks
description "bbb-webhooks"
author "BigBlueButton"
start on (local-filesystems and net-device-up IFACE=eth3)
stop on shutdown
# respawn # we're using monit for it
env USER=firstuser
env APP=app.js
env CMD_OPTS=""
env SRC_DIR="/usr/local/bigbluebutton/bbb-webhooks"
env LOGFILE="/var/log/bbb-webhooks.log"
env NODE=/usr/local/bin/node
env PIDFILE="/var/run/bbb-webhooks.pid"
env NODE_ENV="production"
script
cd $SRC_DIR
echo $$ > $PIDFILE
exec sudo -u $USER NODE_ENV=$NODE_ENV $NODE $APP $CMD_OPTS 1>> $LOGFILE 2>> $LOGFILE
end script
pre-start script
# Date format same as (new Date()).toISOString() for consistency
echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Starting" >> $LOGFILE
end script
pre-stop script
rm $PIDFILE
echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Stopping" >> $LOGFILE
end script