Created
May 17, 2012 08:46
-
-
Save jdeerhake/2717477 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!upstart | |
description "libfitbit client" | |
author "John Deerhake" | |
version "0.0.1" | |
env LIBFITBIT_DIR="/etc/libfitbit" | |
env PYTHON="/usr/bin/python" | |
env LOG_FILE="/var/log/libfitbit_client.log" | |
env PID_FILE="/var/run/libfitbit_client.pid" | |
start on runlevel [235] | |
stop on runlevel [^235] | |
respawn | |
script | |
echo $$ > $PID_FILE | |
exec $PYTHON $LIBFITBIT_DIR/python/fitbit_client.py >> $LOG_FILE 2>&1 | |
end script | |
pre-start script | |
echo "\n[`date`] Starting" >> $LOG_FILE 2>&1 | |
end script | |
pre-stop script | |
rm $PID_FILE | |
echo "\n[`date`] Stopping" >> $LOG_FILE 2>&1 | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment