#! /bin/sh # # Author: Jake Hilton # /etc/init.d/red5 # # Check for missing file RED5_DIR=/opt/red5 test -x $RED5_DIR/red5.sh || exit 5 case "$1" in start) echo -n "Starting Red5 Service" echo -n " " cd $RED5_DIR su -s /bin/bash -c "$RED5_DIR/red5.sh &" red5 sleep 2 ;; stop) echo -n "Shutting down red5" echo -n " " su -s /bin/bash -c "killall -q -u red5 java" red5 sleep 2 ;; restart) ## Stop the service and regardless of whether it was ## running or not, start it again. $0 stop $0 start ;; esac