diff --git a/python_apps/media-monitor/airtime-media-monitor b/python_apps/media-monitor/airtime-media-monitor index 35d2080d0..f1382824b 100755 --- a/python_apps/media-monitor/airtime-media-monitor +++ b/python_apps/media-monitor/airtime-media-monitor @@ -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 diff --git a/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py b/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py index 11a44ae02..a10a0068f 100644 --- a/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py +++ b/python_apps/media-monitor/airtimefilemonitor/mediamonitorcommon.py @@ -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 diff --git a/python_apps/pypo/airtime-liquidsoap b/python_apps/pypo/airtime-liquidsoap index 14f7ff94b..e36f1c73a 100755 --- a/python_apps/pypo/airtime-liquidsoap +++ b/python_apps/pypo/airtime-liquidsoap @@ -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 diff --git a/python_apps/pypo/install/pypo-initialize.py b/python_apps/pypo/install/pypo-initialize.py index dc0874cce..6b0edd2d2 100644 --- a/python_apps/pypo/install/pypo-initialize.py +++ b/python_apps/pypo/install/pypo-initialize.py @@ -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.