sintonia/python_apps/show-recorder/install/recorder-daemontools.sh
naomiaro 537812298b CC-2097 : Show-recorder: Use RabbitMQ, api_client, and the structure of pypofetch
hopefully this will avoid "unknown terminal" problems
2011-03-25 13:22:44 -04:00

18 lines
486 B
Bash

#!/bin/sh
recorder_user="pypo"
export HOME="/home/pypo/"
export TERM=xterm
# Location of pypo_cli.py Python script
recorder_path="/opt/recorder/bin/"
recorder_script="testrecordscript.py"
api_client_path="/opt/pypo/"
cd ${recorder_path}
echo "*** Daemontools: starting daemon"
exec 2>&1
# Note the -u when calling python! we need it to get unbuffered binary stdout and stderr
sudo PYTHONPATH=${api_client_path} -u ${recorder_user} python -u ${recorder_path}${recorder_script}
# EOF