#! /bin/sh # # re_jackmixer init.d script # run re_restream and jackd from this script PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin set -e case "$1" in start) echo -n "Starting stream recorder: stream_recorder.py" stream_recorder.py > /var/log/stream_recorder.log & echo "." ;; stop) echo -n "Stopping stream_recorder: stream_recorder.py " kill `ps ax | awk '/python\ .*stream_recorder.py/ {print $1}'` echo "." ;; restart|force-reload) $0 stop sleep 1 $0 start ;; *) N=/etc/init.d/$NAME # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0