cc-2055: switch to init.d
-fix recorder not starting after upgrade
This commit is contained in:
parent
fffa9d4ffb
commit
7e0db3b76c
|
@ -90,11 +90,12 @@ $sql = "INSERT INTO cc_pref (keystr, valstr) VALUES ('system_version', '1.9.0-de
|
||||||
$CC_DBC->query($sql);
|
$CC_DBC->query($sql);
|
||||||
|
|
||||||
|
|
||||||
echo PHP_EOL."*** Updating Recorder ***".PHP_EOL;
|
|
||||||
system("python ".__DIR__."/../python_apps/show-recorder/install/recorder-install.py");
|
|
||||||
|
|
||||||
echo PHP_EOL."*** Updating Pypo ***".PHP_EOL;
|
echo PHP_EOL."*** Updating Pypo ***".PHP_EOL;
|
||||||
system("python ".__DIR__."/../python_apps/pypo/install/pypo-install.py");
|
passthru("python ".__DIR__."/../python_apps/pypo/install/pypo-install.py");
|
||||||
|
|
||||||
|
echo PHP_EOL."*** Updating Recorder ***".PHP_EOL;
|
||||||
|
passthru("python ".__DIR__."/../python_apps/show-recorder/install/recorder-install.py");
|
||||||
|
|
||||||
|
|
||||||
echo "******************************* Update Complete *******************************".PHP_EOL;
|
echo "******************************* Update Complete *******************************".PHP_EOL;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
recorder_user="pypo"
|
recorder_user="pypo"
|
||||||
export HOME="/var/tmp/airtime/show-recorder/"
|
|
||||||
export TERM=xterm
|
|
||||||
|
|
||||||
# Location of pypo_cli.py Python script
|
# Location of pypo_cli.py Python script
|
||||||
recorder_path="/usr/lib/airtime/show-recorder/"
|
recorder_path="/usr/lib/airtime/show-recorder/"
|
||||||
|
@ -10,17 +10,14 @@ recorder_script="recorder.py"
|
||||||
api_client_path="/usr/lib/airtime/pypo/"
|
api_client_path="/usr/lib/airtime/pypo/"
|
||||||
cd ${recorder_path}
|
cd ${recorder_path}
|
||||||
|
|
||||||
echo "*** Daemontools: starting daemon"
|
|
||||||
exec 2>&1
|
exec 2>&1
|
||||||
# Note the -u when calling python! we need it to get unbuffered binary stdout and stderr
|
|
||||||
|
|
||||||
|
export HOME="/var/tmp/airtime/show-recorder/"
|
||||||
|
export TERM=xterm
|
||||||
export PYTHONPATH=${api_client_path}
|
export PYTHONPATH=${api_client_path}
|
||||||
|
|
||||||
|
|
||||||
#this line works: su ${recorder_user} -c "python -u ${recorder_path}${recorder_script}"
|
#this line works: su ${recorder_user} -c "python -u ${recorder_path}${recorder_script}"
|
||||||
|
# Note the -u when calling python! we need it to get unbuffered binary stdout and stderr
|
||||||
exec python -u ${recorder_path}${recorder_script}
|
exec 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
|
# EOF
|
||||||
|
|
Loading…
Reference in New Issue