From 1a07538253b49a1e12df144f2c005898d52be99f Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Thu, 24 Nov 2022 10:12:59 -0500 Subject: restream, go back to old mount structure --- roles/stream/templates/icecast.xml | 8 ++++---- roles/stream/templates/restream.sh | 1 + roles/stream/templates/screen-restream.sh | 10 ++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100755 roles/stream/templates/screen-restream.sh (limited to 'roles/stream/templates') diff --git a/roles/stream/templates/icecast.xml b/roles/stream/templates/icecast.xml index cf6ec41..37e1a0a 100644 --- a/roles/stream/templates/icecast.xml +++ b/roles/stream/templates/icecast.xml @@ -169,7 +169,7 @@
- /home/icecast/bin/stream-start + /home/icecast/bin/stream-startg /home/icecast/bin/stream-stop --> @@ -189,7 +189,7 @@ --> {% for track in emacsconf_tracks %} - /{{ track.id }}.webm + /{{ emacsconf_id }}/{{ track.id }}.webm {{ icecast_emacsconf_user }} {{ icecast_emacsconf_password }} {% if icecast_save_dump %}/data/{{ emacsconf_id }}-{{ emacsconf_year }}-{{ track.id }}_%Y-%m-%d_%H-%M-%S.webm{% endif %} @@ -202,7 +202,7 @@ /usr/local/bin/{{ emacsconf_id }}-lowres-{{ track.id }}-on-disconnect - /{{ track.id }}-host.webm + /{{ emacsconf_id }}/{{ track.id }}-host.webm {{ icecast_emacsconf_user }} {{ icecast_emacsconf_password }} EmacsConf {{ emacsconf_year }} - {{ track.name }} track @@ -213,7 +213,7 @@ 1 - /{{ track.id }}-480p.webm + /{{ emacsconf_id }}/{{ track.id }}-480p.webm {{ icecast_emacsconf_user }} {{ icecast_emacsconf_password }} {{ emacsconf_name }} {{ emacsconf_year }} - {{ track.name }} track (480p) diff --git a/roles/stream/templates/restream.sh b/roles/stream/templates/restream.sh index e1d0a7f..81970c7 100755 --- a/roles/stream/templates/restream.sh +++ b/roles/stream/templates/restream.sh @@ -1,5 +1,6 @@ #!/bin/bash # {{ ansible_managed }} +# echo $$ > /tmp/restream-{{ item[1].key }}.pid MOUNT={{ item[0].stream_url }}/{{ item[1].key }} # rtmp://..../stream_key LOGLEVEL="${LOGLEVEL:-24}" for i in 1 2 3 4 5; do diff --git a/roles/stream/templates/screen-restream.sh b/roles/stream/templates/screen-restream.sh new file mode 100755 index 0000000..7466c48 --- /dev/null +++ b/roles/stream/templates/screen-restream.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# {{ ansible_managed }} + +SCREEN_NAME=restream-{{ item[1].name }}-{{ item[0].name }} +if screen -S $SCREEN_NAME -Q select ; then + echo "Already restreaming; screen -S $SCREEN_NAME -X quit if you need to restart" +else + screen -dmS $SCREEN_NAME /home/{{ emacsconf_user }}/restream-{{ item[1].name }}-{{ item[0].name }}e.sh + echo "Started screen; connect with screen -x $SCREEN_NAME" +fi -- cgit v1.2.3