CC-3794: Liquidsoap isn't in media monitor's path
This commit is contained in:
parent
3b2e812e51
commit
aeb9db95f0
|
@ -15,7 +15,6 @@ cd ${media_monitor_path}
|
|||
exec 2>&1
|
||||
|
||||
export PYTHONPATH=${api_client_path}
|
||||
export PATH=/usr/lib/airtime/pypo/bin/liquidsoap_bin/:$PATH
|
||||
|
||||
# Note the -u when calling python! we need it to get unbuffered binary stdout and stderr
|
||||
exec python -u ${media_monitor_path}${media_monitor_script} > /var/log/airtime/media-monitor/py-interpreter.log 2>&1
|
||||
|
|
|
@ -325,7 +325,7 @@ class MediaMonitorCommon:
|
|||
#with '\''. This breaks the string into two, and inserts an escaped single quote in between them.
|
||||
#We run the command as pypo because otherwise the target file is opened with write permissions, and this causes an inotify ON_CLOSE_WRITE event
|
||||
#to be fired :/
|
||||
command = "sudo -u pypo liquidsoap -c 'output.dummy(audio_to_stereo(single(\"%s\")))' > /dev/null 2>&1" % pathname.replace("'", "'\\''")
|
||||
command = "sudo -u pypo airtime-liquidsoap -c 'output.dummy(audio_to_stereo(single(\"%s\")))' > /dev/null 2>&1" % pathname.replace("'", "'\\''")
|
||||
return_code = subprocess.call(command, shell=True)
|
||||
if return_code != 0:
|
||||
#print pathname for py-interpreter.log
|
||||
|
|
|
@ -6,7 +6,7 @@ virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/"
|
|||
ls_user="pypo"
|
||||
export HOME="/var/tmp/airtime/pypo/"
|
||||
api_client_path="/usr/lib/airtime/"
|
||||
ls_path="/usr/lib/airtime/pypo/bin/liquidsoap_bin/liquidsoap --verbose"
|
||||
ls_path="/usr/bin/airtime-liquidsoap --verbose"
|
||||
ls_param="/usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq"
|
||||
|
||||
exec 2>&1
|
||||
|
|
|
@ -88,8 +88,15 @@ try:
|
|||
binary_path = os.path.join(PATH_LIQUIDSOAP_BIN, "liquidsoap_%s_%s" % (codename, arch))
|
||||
|
||||
try:
|
||||
#open(binary_path)
|
||||
shutil.copy(binary_path, "%s/liquidsoap"%PATH_LIQUIDSOAP_BIN)
|
||||
open(binary_path)
|
||||
|
||||
try:
|
||||
os.remove("/usr/bin/airtime-liquidsoap")
|
||||
except OSError, e:
|
||||
#only get here if it doesn't exist
|
||||
pass
|
||||
|
||||
os.symlink(binary_path, "/usr/bin/airtime-liquidsoap")
|
||||
except IOError, e:
|
||||
"""
|
||||
shutil.copy can throw this exception for two reasons. First reason is that it cannot open the source file.
|
||||
|
|
Loading…
Reference in New Issue