Fix to setuptools deployment of pyponotify and liquidsoap
This commit is contained in:
parent
45309bb605
commit
b673017bfd
|
@ -51,7 +51,7 @@ parser.add_option("-n", "--liquidsoap-started", help="notify liquidsoap started"
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
# configure logging
|
# configure logging
|
||||||
logging.config.fileConfig("notify_logging.cfg")
|
logging.config.fileConfig('/etc/airtime/notify_logging.cfg')
|
||||||
logger = logging.getLogger('notify')
|
logger = logging.getLogger('notify')
|
||||||
LogWriter.override_std_err(logger)
|
LogWriter.override_std_err(logger)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
def notify(m)
|
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)
|
log(command)
|
||||||
system(command)
|
system(command)
|
||||||
end
|
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
|
#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.
|
#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)
|
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
|
if !current_dyn_id != "-1" then
|
||||||
log(command)
|
log(command)
|
||||||
|
@ -93,14 +93,14 @@ def output_to(output_type, type, bitrate, host, port, pass, mount_point, url, de
|
||||||
source = ref s
|
source = ref s
|
||||||
def on_error(msg)
|
def on_error(msg)
|
||||||
connected := "false"
|
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)
|
system(command)
|
||||||
log(command)
|
log(command)
|
||||||
5.
|
5.
|
||||||
end
|
end
|
||||||
def on_connect()
|
def on_connect()
|
||||||
connected := "true"
|
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)
|
system(command)
|
||||||
log(command)
|
log(command)
|
||||||
end
|
end
|
||||||
|
|
|
@ -188,7 +188,7 @@ def make_scheduled_play_unavailable()
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_source_status(sourcename, status) =
|
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)
|
system(command)
|
||||||
log(command)
|
log(command)
|
||||||
end
|
end
|
||||||
|
@ -399,6 +399,6 @@ if s3_enable == true then
|
||||||
s3_connected, s3_description, s3_channels)
|
s3_connected, s3_description, s3_channels)
|
||||||
end
|
end
|
||||||
|
|
||||||
command = "timeout --signal=KILL 45 python pyponotify --liquidsoap-started &"
|
command = "timeout --signal=KILL 45 pyponotify --liquidsoap-started &"
|
||||||
log(command)
|
log(command)
|
||||||
system(command)
|
system(command)
|
||||||
|
|
|
@ -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 "$@"
|
|
|
@ -20,6 +20,7 @@ else:
|
||||||
data_files = [
|
data_files = [
|
||||||
('/etc/init', ['install/airtime-playout.conf.template']),
|
('/etc/init', ['install/airtime-playout.conf.template']),
|
||||||
('/etc/init', ['install/airtime-liquidsoap.conf.template']),
|
('/etc/init', ['install/airtime-liquidsoap.conf.template']),
|
||||||
|
('/etc/airtime', ['pypo/notify_logging.cfg']),
|
||||||
('/var/log/airtime/pypo', []),
|
('/var/log/airtime/pypo', []),
|
||||||
('/var/log/airtime/pypo-liquidsoap', []),
|
('/var/log/airtime/pypo-liquidsoap', []),
|
||||||
('/var/tmp/airtime/pypo', []),
|
('/var/tmp/airtime/pypo', []),
|
||||||
|
@ -35,7 +36,7 @@ setup(name='airtime-playout',
|
||||||
url='http://github.com/sourcefabric/Airtime',
|
url='http://github.com/sourcefabric/Airtime',
|
||||||
author='sourcefabric',
|
author='sourcefabric',
|
||||||
license='AGPLv3',
|
license='AGPLv3',
|
||||||
packages=['pypo', 'pypo.media', 'pypo.media.update',
|
packages=['pypo', 'pypo.media.update',
|
||||||
'liquidsoap', 'liquidsoap.library'],
|
'liquidsoap', 'liquidsoap.library'],
|
||||||
package_data={'': ['*.liq', '*.cfg']},
|
package_data={'': ['*.liq', '*.cfg']},
|
||||||
scripts=[
|
scripts=[
|
||||||
|
|
Loading…
Reference in New Issue