#The script to start Red 5 Tapas Mishra ##Begin some thing some thing ### BEGIN INIT INFO # Provides: Red5 # Required-Start: No idea # Required-Stop: No idea # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Red5 Streaming Server # Description: Ubuntu init script for Red5 server ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON="/usr/local/bin/red5-1.3.33/red5.sh" NAME="Red5" RED5_HOME=/usr/local/bin/red5-1.3.33 PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME DESC="Red5 Ubuntu Server" . /lib/lsb/init-functions set -e PROCESS_DIR="/usr/local/bin/red5-1.3.33" case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" start-stop-daemon --start --pidfile $PIDFILE \ --chdir $RED5_HOME --background --make-pidfile \ --exec $DAEMON log_end_msg $? ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" start-stop-daemon --stop --quiet --pidfile $PIDFILE \ --name java rm -f $PIDFILE log_end_msg $? ;; restart|force-reload) echo -n "Restarting $DESC: $NAME" start-stop-daemon --stop --quiet --pidfile $PIDFILE \ --name java rm -f $PIDFILE sleep 1 echo -e $0 start ;; *) echo "Usage: $0 {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0