Skip to content

Commit

Permalink
Fix to setuptools deployment of pyponotify and liquidsoap
Browse files Browse the repository at this point in the history
  • Loading branch information
dpsommer committed Jan 28, 2015
1 parent 45309bb commit b673017
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 22 deletions.
2 changes: 1 addition & 1 deletion python_apps/pypo/bin/pyponotify
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ parser.add_option("-n", "--liquidsoap-started", help="notify liquidsoap started"
(options, args) = parser.parse_args()

# configure logging
logging.config.fileConfig("notify_logging.cfg")
logging.config.fileConfig('/etc/airtime/notify_logging.cfg')
logger = logging.getLogger('notify')
LogWriter.override_std_err(logger)

Expand Down
8 changes: 4 additions & 4 deletions python_apps/pypo/liquidsoap/ls_lib.liq
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions python_apps/pypo/liquidsoap/ls_script.liq
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
14 changes: 0 additions & 14 deletions python_apps/pypo/liquidsoap/notify.sh

This file was deleted.

3 changes: 2 additions & 1 deletion python_apps/pypo/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
data_files = [
('/etc/init', ['install/airtime-playout.conf.template']),
('/etc/init', ['install/airtime-liquidsoap.conf.template']),
('/etc/airtime', ['pypo/notify_logging.cfg']),
('/var/log/airtime/pypo', []),
('/var/log/airtime/pypo-liquidsoap', []),
('/var/tmp/airtime/pypo', []),
Expand All @@ -35,7 +36,7 @@
url='http://github.com/sourcefabric/Airtime',
author='sourcefabric',
license='AGPLv3',
packages=['pypo', 'pypo.media', 'pypo.media.update',
packages=['pypo', 'pypo.media.update',
'liquidsoap', 'liquidsoap.library'],
package_data={'': ['*.liq', '*.cfg']},
scripts=[
Expand Down

0 comments on commit b673017

Please sign in to comment.