sintonia/python_apps/show-recorder/airtime-show-recorder

26 lines
679 B
Bash
Executable File

#!/bin/sh
recorder_user="pypo"
export HOME="/var/tmp/airtime/show-recorder/"
export TERM=xterm
# Location of pypo_cli.py Python script
recorder_path="/usr/lib/airtime/show-recorder/"
recorder_script="recorder.py"
api_client_path="/usr/lib/airtime/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
export PYTHONPATH=${api_client_path}
su ${recorder_user} -c "python -u ${recorder_path}${recorder_script}"
#ecasound does not work when recorder script is called with setuidgid.
#setuidgid ${recorder_user} python -u ${recorder_path}${recorder_script}
# EOF