Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/etc/init/growthforecast.conf with upstart
start on startup
stop on runlevel [016]
respawn
env USER="growthforecast"
env PERLVER=5.16.2
env PROG_PATH=/home/${USER}/perl5/perlbrew/perls/perl-${PERLVER}/bin/growthforecast.pl
env LOG="/var/log/growthforecast/growthforecast.log"
env MYSQL_USER=growthforecast
env MYSQL_PASSWORD=
exec su -c "MYSQL_USER=${MYSQL_PASSWORD} MYSQL_PASSWORD=${MYSQL_PASSWORD} exec ${PROG_PATH} --with-mysql 'dbi:mysql:growthforecast;hostname=localhost' --host 127.0.0.1 --front-proxy 127.0.0.1 --port 5125 >> ${LOG} 2>&1" ${USER}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment