From a153cb1e281357300ae43454cba593b9cf0c3bde Mon Sep 17 00:00:00 2001 From: Yoann QUERET Date: Tue, 9 Feb 2016 16:29:25 +0100 Subject: Bye bye old script, welcome supervisor --- radio.sh | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100755 radio.sh (limited to 'radio.sh') diff --git a/radio.sh b/radio.sh deleted file mode 100755 index 31a5ac1..0000000 --- a/radio.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# -# Start the encoder for the radio - -set -e - -source site/configuration.sh - -printerr() { - echo -e "\033[01;31m$1\033[0m" -} - -printmsg() { - echo -e "\033[01;32m$1\033[0m" -} - -script_pid=0 -sigint_trap() { - printerr "Got Ctrl-C" - if [[ "$script_pid" != "0" ]] ; then - printmsg "killing radio encoder script $script_pid" - kill -INT $script_pid - script_pid=0 - wait - fi -} - -set -e - -# check number of arguments -if [[ "$#" -lt 1 ]] ; then - echo "Usage $0 radio-id" - echo "You must specify which radio to start" - exit 1 -fi - -RADIO=$1 - -if [ "${radios[$RADIO]+_}" ] ; then - COMMAND=${radios[$RADIO]} - - trap sigint_trap SIGINT - - # execute script - $COMMAND & - script_pid=$! - wait -else - echo "Radio $RADIO not defined in configuration" - exit 1 -fi - -- cgit v1.2.3