sintonia/python_apps/pypo/install/pypo-daemontools.sh
Paul Baranowski aab1ad16e1 CC-2166 : Packaging improvements
Fixed paths for pypo and the show recorder.

Pypo and the show recorder now read their paths from the INI files.
Note that liquidsoap and shell scripts do not yet read from the
INI files, and so that paths are hard-coded in those places.

On uninstall, no longer deleting INI files and the STOR directory.
Included a note to remove those by hand if they want them gone.

Fixed some bugs where not all directories were removed on uninstall.

Fixed bugs in the Show Recorder install where it was adding directories
that it didnt need.
2011-04-15 14:45:10 -04:00

18 lines
515 B
Bash
Executable file

#!/bin/sh
pypo_user="pypo"
export HOME="/var/tmp/airtime/pypo/"
# Location of pypo_cli.py Python script
pypo_path="/usr/lib/airtime/pypo/bin/"
api_client_path="/usr/lib/airtime/pypo/"
pypo_script="pypo-cli.py"
echo "*** Daemontools: starting daemon"
cd ${pypo_path}
exec 2>&1
PYTHONPATH=${api_client_path}:$PYTHONPATH
export PYTHONPATH
# Note the -u when calling python! we need it to get unbuffered binary stdout and stderr
exec setuidgid ${pypo_user} \
python -u ${pypo_path}${pypo_script}
# EOF