Rename python apps entrypoints
BREAKING: Remove old entrypoints using sudo rm -f \ /usr/{bin,local/bin}/airtime-liquidsoap \ /usr/{bin,local/bin}/airtime-playout \ /usr/{bin,local/bin}/pyponotify
This commit is contained in:
parent
bde2f2d494
commit
8be1366bef
12 changed files with 23 additions and 23 deletions
|
@ -2,7 +2,7 @@
|
|||
Description=Libretime Liquidsoap Service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/airtime-liquidsoap
|
||||
ExecStart=/usr/local/bin/libretime-liquidsoap
|
||||
User=libretime-playout
|
||||
Group=libretime-playout
|
||||
Restart=always
|
||||
|
|
|
@ -3,7 +3,7 @@ Description=Libretime Playout Service
|
|||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/airtime-playout
|
||||
ExecStart=/usr/local/bin/libretime-playout
|
||||
User=libretime-pypo
|
||||
Group=libretime-pypo
|
||||
Restart=always
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
def notify(m)
|
||||
command = "timeout --signal=KILL 45 pyponotify --media-id=#{m['schedule_table_id']} &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --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 pyponotify --webstream='#{json_str}' --media-id=#{!current_dyn_id} &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --webstream='#{json_str}' --media-id=#{!current_dyn_id} &"
|
||||
|
||||
if !current_dyn_id != "-1" then
|
||||
log(command)
|
||||
|
@ -97,14 +97,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 pyponotify --error='#{msg}' --stream-id=#{stream} --time=#{!time} &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --error='#{msg}' --stream-id=#{stream} --time=#{!time} &"
|
||||
system(command)
|
||||
log(command)
|
||||
5.
|
||||
end
|
||||
def on_connect()
|
||||
connected := "true"
|
||||
command = "timeout --signal=KILL 45 pyponotify --connect --stream-id=#{stream} --time=#{!time} &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --connect --stream-id=#{stream} --time=#{!time} &"
|
||||
system(command)
|
||||
log(command)
|
||||
end
|
||||
|
|
|
@ -212,7 +212,7 @@ def make_scheduled_play_unavailable()
|
|||
end
|
||||
|
||||
def update_source_status(sourcename, status) =
|
||||
command = "timeout --signal=KILL 45 pyponotify --source-name=#{sourcename} --source-status=#{status} &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --source-name=#{sourcename} --source-status=#{status} &"
|
||||
system(command)
|
||||
log(command)
|
||||
end
|
||||
|
@ -438,6 +438,6 @@ if s4_enable == true then
|
|||
end
|
||||
|
||||
|
||||
command = "timeout --signal=KILL 45 pyponotify --liquidsoap-started &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --liquidsoap-started &"
|
||||
log(command)
|
||||
system(command)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
def notify(m)
|
||||
command = "timeout --signal=KILL 45 pyponotify --media-id=#{m['schedule_table_id']} &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --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 pyponotify --webstream='#{json_str}' --media-id=#{!current_dyn_id} &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --webstream='#{json_str}' --media-id=#{!current_dyn_id} &"
|
||||
|
||||
if !current_dyn_id != "-1" then
|
||||
log(command)
|
||||
|
@ -97,14 +97,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 pyponotify --error='#{msg}' --stream-id=#{stream} --time=#{!time} &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --error='#{msg}' --stream-id=#{stream} --time=#{!time} &"
|
||||
system(command)
|
||||
log(command)
|
||||
5.
|
||||
end
|
||||
def on_connect()
|
||||
connected := "true"
|
||||
command = "timeout --signal=KILL 45 pyponotify --connect --stream-id=#{stream} --time=#{!time} &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --connect --stream-id=#{stream} --time=#{!time} &"
|
||||
system(command)
|
||||
log(command)
|
||||
end
|
||||
|
|
|
@ -212,7 +212,7 @@ def make_scheduled_play_unavailable()
|
|||
end
|
||||
|
||||
def update_source_status(sourcename, status) =
|
||||
command = "timeout --signal=KILL 45 pyponotify --source-name=#{sourcename} --source-status=#{status} &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --source-name=#{sourcename} --source-status=#{status} &"
|
||||
system(command)
|
||||
log(command)
|
||||
end
|
||||
|
@ -452,6 +452,6 @@ if s4_enable == true then
|
|||
end
|
||||
|
||||
|
||||
command = "timeout --signal=KILL 45 pyponotify --liquidsoap-started &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --liquidsoap-started &"
|
||||
log(command)
|
||||
system(command)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
def notify(m)
|
||||
command = "timeout --signal=KILL 45 pyponotify --media-id=#{m['schedule_table_id']} &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --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 pyponotify --webstream='#{json_str}' --media-id=#{!current_dyn_id} &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --webstream='#{json_str}' --media-id=#{!current_dyn_id} &"
|
||||
|
||||
if !current_dyn_id != "-1" then
|
||||
log(command)
|
||||
|
@ -88,14 +88,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 pyponotify --error='#{msg}' --stream-id=#{stream} --time=#{!time} &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --error='#{msg}' --stream-id=#{stream} --time=#{!time} &"
|
||||
system(command)
|
||||
log(command)
|
||||
5.
|
||||
end
|
||||
def on_connect()
|
||||
connected := "true"
|
||||
command = "timeout --signal=KILL 45 pyponotify --connect --stream-id=#{stream} --time=#{!time} &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --connect --stream-id=#{stream} --time=#{!time} &"
|
||||
system(command)
|
||||
log(command)
|
||||
end
|
||||
|
|
|
@ -215,7 +215,7 @@ def make_scheduled_play_unavailable()
|
|||
end
|
||||
|
||||
def update_source_status(sourcename, status) =
|
||||
command = "timeout --signal=KILL 45 pyponotify --source-name=#{sourcename} --source-status=#{status} &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --source-name=#{sourcename} --source-status=#{status} &"
|
||||
system(command)
|
||||
log(command)
|
||||
end
|
||||
|
@ -455,6 +455,6 @@ if s4_enable == true then
|
|||
end
|
||||
|
||||
|
||||
command = "timeout --signal=KILL 45 pyponotify --liquidsoap-started &"
|
||||
command = "timeout --signal=KILL 45 libretime-playout-notify --liquidsoap-started &"
|
||||
log(command)
|
||||
system(command)
|
||||
|
|
|
@ -25,9 +25,9 @@ setup(
|
|||
],
|
||||
package_data={"": ["**/*.liq", "*.cfg", "*.types"]},
|
||||
scripts=[
|
||||
"bin/airtime-playout",
|
||||
"bin/airtime-liquidsoap",
|
||||
"bin/pyponotify",
|
||||
"bin/libretime-playout",
|
||||
"bin/libretime-liquidsoap",
|
||||
"bin/libretime-playout-notify",
|
||||
],
|
||||
python_requires=">=3.6",
|
||||
install_requires=[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue