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
|
Description=Libretime Liquidsoap Service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/local/bin/airtime-liquidsoap
|
ExecStart=/usr/local/bin/libretime-liquidsoap
|
||||||
User=libretime-playout
|
User=libretime-playout
|
||||||
Group=libretime-playout
|
Group=libretime-playout
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
|
@ -3,7 +3,7 @@ Description=Libretime Playout Service
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/local/bin/airtime-playout
|
ExecStart=/usr/local/bin/libretime-playout
|
||||||
User=libretime-pypo
|
User=libretime-pypo
|
||||||
Group=libretime-pypo
|
Group=libretime-pypo
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
def notify(m)
|
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)
|
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 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
|
if !current_dyn_id != "-1" then
|
||||||
log(command)
|
log(command)
|
||||||
|
@ -97,14 +97,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 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)
|
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 pyponotify --connect --stream-id=#{stream} --time=#{!time} &"
|
command = "timeout --signal=KILL 45 libretime-playout-notify --connect --stream-id=#{stream} --time=#{!time} &"
|
||||||
system(command)
|
system(command)
|
||||||
log(command)
|
log(command)
|
||||||
end
|
end
|
||||||
|
|
|
@ -212,7 +212,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 pyponotify --source-name=#{sourcename} --source-status=#{status} &"
|
command = "timeout --signal=KILL 45 libretime-playout-notify --source-name=#{sourcename} --source-status=#{status} &"
|
||||||
system(command)
|
system(command)
|
||||||
log(command)
|
log(command)
|
||||||
end
|
end
|
||||||
|
@ -438,6 +438,6 @@ if s4_enable == true then
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
command = "timeout --signal=KILL 45 pyponotify --liquidsoap-started &"
|
command = "timeout --signal=KILL 45 libretime-playout-notify --liquidsoap-started &"
|
||||||
log(command)
|
log(command)
|
||||||
system(command)
|
system(command)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
def notify(m)
|
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)
|
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 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
|
if !current_dyn_id != "-1" then
|
||||||
log(command)
|
log(command)
|
||||||
|
@ -97,14 +97,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 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)
|
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 pyponotify --connect --stream-id=#{stream} --time=#{!time} &"
|
command = "timeout --signal=KILL 45 libretime-playout-notify --connect --stream-id=#{stream} --time=#{!time} &"
|
||||||
system(command)
|
system(command)
|
||||||
log(command)
|
log(command)
|
||||||
end
|
end
|
||||||
|
|
|
@ -212,7 +212,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 pyponotify --source-name=#{sourcename} --source-status=#{status} &"
|
command = "timeout --signal=KILL 45 libretime-playout-notify --source-name=#{sourcename} --source-status=#{status} &"
|
||||||
system(command)
|
system(command)
|
||||||
log(command)
|
log(command)
|
||||||
end
|
end
|
||||||
|
@ -452,6 +452,6 @@ if s4_enable == true then
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
command = "timeout --signal=KILL 45 pyponotify --liquidsoap-started &"
|
command = "timeout --signal=KILL 45 libretime-playout-notify --liquidsoap-started &"
|
||||||
log(command)
|
log(command)
|
||||||
system(command)
|
system(command)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
def notify(m)
|
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)
|
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 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
|
if !current_dyn_id != "-1" then
|
||||||
log(command)
|
log(command)
|
||||||
|
@ -88,14 +88,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 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)
|
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 pyponotify --connect --stream-id=#{stream} --time=#{!time} &"
|
command = "timeout --signal=KILL 45 libretime-playout-notify --connect --stream-id=#{stream} --time=#{!time} &"
|
||||||
system(command)
|
system(command)
|
||||||
log(command)
|
log(command)
|
||||||
end
|
end
|
||||||
|
|
|
@ -215,7 +215,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 pyponotify --source-name=#{sourcename} --source-status=#{status} &"
|
command = "timeout --signal=KILL 45 libretime-playout-notify --source-name=#{sourcename} --source-status=#{status} &"
|
||||||
system(command)
|
system(command)
|
||||||
log(command)
|
log(command)
|
||||||
end
|
end
|
||||||
|
@ -455,6 +455,6 @@ if s4_enable == true then
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
command = "timeout --signal=KILL 45 pyponotify --liquidsoap-started &"
|
command = "timeout --signal=KILL 45 libretime-playout-notify --liquidsoap-started &"
|
||||||
log(command)
|
log(command)
|
||||||
system(command)
|
system(command)
|
||||||
|
|
|
@ -25,9 +25,9 @@ setup(
|
||||||
],
|
],
|
||||||
package_data={"": ["**/*.liq", "*.cfg", "*.types"]},
|
package_data={"": ["**/*.liq", "*.cfg", "*.types"]},
|
||||||
scripts=[
|
scripts=[
|
||||||
"bin/airtime-playout",
|
"bin/libretime-playout",
|
||||||
"bin/airtime-liquidsoap",
|
"bin/libretime-liquidsoap",
|
||||||
"bin/pyponotify",
|
"bin/libretime-playout-notify",
|
||||||
],
|
],
|
||||||
python_requires=">=3.6",
|
python_requires=">=3.6",
|
||||||
install_requires=[
|
install_requires=[
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue