CC-3794: Liquidsoap isn't in media monitor's path

This commit is contained in:
Martin Konecny 2012-05-09 14:18:17 -04:00
parent 3b2e812e51
commit aeb9db95f0
4 changed files with 11 additions and 5 deletions

View File

@ -15,7 +15,6 @@ cd ${media_monitor_path}
exec 2>&1 exec 2>&1
export PYTHONPATH=${api_client_path} 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 # 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 exec python -u ${media_monitor_path}${media_monitor_script} > /var/log/airtime/media-monitor/py-interpreter.log 2>&1

View File

@ -325,7 +325,7 @@ class MediaMonitorCommon:
#with '\''. This breaks the string into two, and inserts an escaped single quote in between them. #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 #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 :/ #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) return_code = subprocess.call(command, shell=True)
if return_code != 0: if return_code != 0:
#print pathname for py-interpreter.log #print pathname for py-interpreter.log

View File

@ -6,7 +6,7 @@ virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/"
ls_user="pypo" ls_user="pypo"
export HOME="/var/tmp/airtime/pypo/" export HOME="/var/tmp/airtime/pypo/"
api_client_path="/usr/lib/airtime/" 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" ls_param="/usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq"
exec 2>&1 exec 2>&1

View File

@ -88,8 +88,15 @@ try:
binary_path = os.path.join(PATH_LIQUIDSOAP_BIN, "liquidsoap_%s_%s" % (codename, arch)) binary_path = os.path.join(PATH_LIQUIDSOAP_BIN, "liquidsoap_%s_%s" % (codename, arch))
try: try:
#open(binary_path) open(binary_path)
shutil.copy(binary_path, "%s/liquidsoap"%PATH_LIQUIDSOAP_BIN)
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: except IOError, e:
""" """
shutil.copy can throw this exception for two reasons. First reason is that it cannot open the source file. shutil.copy can throw this exception for two reasons. First reason is that it cannot open the source file.