summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--scripts/supervisord.conf4
-rwxr-xr-xscripts/sydra-manager.sh16
-rwxr-xr-xscripts/sydra-receiver.sh (renamed from scripts/show-stream.sh)3
4 files changed, 18 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index 4548a5d..bff9132 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,5 +8,5 @@ src/config*.h
src/recordings/
scripts/logs/
scripts/recordings/
-scripts/show-stream.current
+scripts/sydra-receiver.main
scripts/supervisord.pid
diff --git a/scripts/supervisord.conf b/scripts/supervisord.conf
index a4199e2..1e0df7f 100644
--- a/scripts/supervisord.conf
+++ b/scripts/supervisord.conf
@@ -32,7 +32,7 @@ startsecs=0
startretries=10
[program:overview]
-command=/home/equinox/spreadspace/sydra/scripts/show-stream.sh %(here)s %(program_name)s %(process_num)02d
+command=/home/equinox/spreadspace/sydra/scripts/sydra-receiver.sh %(here)s %(program_name)s %(process_num)02d
process_name=%(process_num)02d
numprocs=6
priority=20
@@ -42,7 +42,7 @@ startsecs=0
startretries=10
[program:main]
-command=/home/equinox/spreadspace/sydra/scripts/show-stream.sh %(here)s %(program_name)s
+command=/home/equinox/spreadspace/sydra/scripts/sydra-receiver.sh %(here)s %(program_name)s
process_name=main
numprocs=1
priority=30
diff --git a/scripts/sydra-manager.sh b/scripts/sydra-manager.sh
index 093d557..bd6c24b 100755
--- a/scripts/sydra-manager.sh
+++ b/scripts/sydra-manager.sh
@@ -29,7 +29,8 @@ if [[ ! -p $PIPE ]]; then
fi
cd "$ROOT_D"
-echo "00" > show-stream.current
+MAIN_STAT_FILE="sydra-receiver.main"
+echo "00" > $MAIN_STAT_FILE
while true
do
@@ -46,13 +47,22 @@ do
select)
get_num $arg
if [ -n "$NUM" ]; then
- echo "$NUM" > show-stream.current
+ echo "$NUM" > $MAIN_STAT_FILE
supervisorctl restart "$GROUP_NAME:main"
+ else
+ echo "unkown client: $arg" >&2
fi
NUM=''
;;
+ reloadconfig)
+ kill -SIGHUP `cat supervisord.pid`
+ ;;
+ killall)
+ kill `cat supervisord.pid`
+ ;;
*)
- ;;
+ echo "unkown command: $cmd" >&2
+ ;;
esac
fi
done
diff --git a/scripts/show-stream.sh b/scripts/sydra-receiver.sh
index 2f618a2..7d2a3e6 100755
--- a/scripts/show-stream.sh
+++ b/scripts/sydra-receiver.sh
@@ -7,6 +7,7 @@ NUM="$3"
SYDRA_RTP="/home/equinox/spreadspace/sydra/src/sydra-rtp"
SYDRA_LAUNCH="/home/equinox/spreadspace/sydra/src/sydra-launch"
+MAIN_STAT_FILE="sydra-receiver.main"
############################
@@ -83,7 +84,7 @@ case "$TAG" in
[ -n "$SYDRA_TEST" ] && start_test_overview "$ID" "$TITLE" $PORT_BASE
;;
main)
- read NUM < "$ROOT_D/show-stream.current"
+ read NUM < "$MAIN_STAT_FILE"
get_id_title_and_port "$NUM"
if [ -z "$ID" ]; then
echo "$ROOT_D/show-stream.current contains an invalid process number: $NUM"