Fix to setuptools deployment of pyponotify and liquidsoap

This commit is contained in:
Duncan Sommerville 2015-01-28 15:09:13 -05:00
parent 45309bb605
commit b673017bfd
5 changed files with 9 additions and 22 deletions

View file

@ -1,5 +1,5 @@
def notify(m)
command = "timeout --signal=KILL 45 python pyponotify --media-id=#{m['schedule_table_id']} &"
command = "timeout --signal=KILL 45 pyponotify --media-id=#{m['schedule_table_id']} &"
log(command)
system(command)
end
@ -15,7 +15,7 @@ def notify_stream(m)
#if a string has a single apostrophe in it, let's comment it out by ending the string before right before it
#escaping the apostrophe, and then starting a new string right after it. This is why we use 3 apostrophes.
json_str = string.replace(pattern="'",(fun (s) -> "'\''"), json_str)
command = "timeout --signal=KILL 45 python pyponotify --webstream='#{json_str}' --media-id=#{!current_dyn_id} &"
command = "timeout --signal=KILL 45 pyponotify --webstream='#{json_str}' --media-id=#{!current_dyn_id} &"
if !current_dyn_id != "-1" then
log(command)
@ -93,14 +93,14 @@ def output_to(output_type, type, bitrate, host, port, pass, mount_point, url, de
source = ref s
def on_error(msg)
connected := "false"
command = "timeout --signal=KILL 45 python pyponotify --error='#{msg}' --stream-id=#{stream} --time=#{!time} &"
command = "timeout --signal=KILL 45 pyponotify --error='#{msg}' --stream-id=#{stream} --time=#{!time} &"
system(command)
log(command)
5.
end
def on_connect()
connected := "true"
command = "timeout --signal=KILL 45 python pyponotify --connect --stream-id=#{stream} --time=#{!time} &"
command = "timeout --signal=KILL 45 pyponotify --connect --stream-id=#{stream} --time=#{!time} &"
system(command)
log(command)
end

View file

@ -188,7 +188,7 @@ def make_scheduled_play_unavailable()
end
def update_source_status(sourcename, status) =
command = "timeout --signal=KILL 45 python pyponotify --source-name=#{sourcename} --source-status=#{status} &"
command = "timeout --signal=KILL 45 pyponotify --source-name=#{sourcename} --source-status=#{status} &"
system(command)
log(command)
end
@ -399,6 +399,6 @@ if s3_enable == true then
s3_connected, s3_description, s3_channels)
end
command = "timeout --signal=KILL 45 python pyponotify --liquidsoap-started &"
command = "timeout --signal=KILL 45 pyponotify --liquidsoap-started &"
log(command)
system(command)

View file

@ -1,14 +0,0 @@
#!/bin/bash
############################################
# just a wrapper to call the notifyer #
# needed here to keep dirs/configs clean #
# and maybe to set user-rights #
############################################
# Absolute path to this script
SCRIPT=`readlink -f $0`
# Absolute path this script is in
SCRIPTPATH=`dirname $SCRIPT`
cd ${SCRIPTPATH}/../
timeout --signal=KILL 45 python pyponotify.py "$@"