summaryrefslogtreecommitdiffstats
path: root/roles/stream/templates/screen-restream.sh
blob: e25f5741b63e42823e90e723ec99bca45eaea81b (plain) (blame)
1
2
3
4
5
6
7
8
9
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 /usr/local/bin/restream-{{ item[1].name }}-{{ item[0].name }}
    echo "Started screen; connect with screen -x $SCREEN_NAME"
fi