#! /bin/sh # # streaming Start/Stop MPEG-4 streaming server # # chkconfig: - 13 87 # description: An MPEG-4 video and audio streaming server. Enable this if you # wish to run an internet TV station. # processname: DarwinStreamingServer # This is an interactive program, we need the current locale [ -f /etc/profile.d/lang.sh ] && . /etc/profile.d/lang.sh if [ "$LANG" = "ja" -o "$LANG" = "ja_JP.eucJP" ]; then # We can't Japanese on normal console at boot time. # So, force to set LANG=C if [ "$TERM" = "linux" ] ; then LANG=C fi fi # Source function library. . /etc/init.d/functions # Get config. if [ -f /etc/sysconfig/network ] then . /etc/sysconfig/network else echo $"Networking not configured - exiting" exit 1 fi prog="DarwinStreamingServer" # Check that networking is up. if [ "$NETWORKING" = "no" ] then exit 0 fi RETVAL=0 start() { echo -n $"Starting $prog: " daemon DarwinStreamingServer RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/streaming return $RETVAL } stop() { echo -n $"Stopping $prog: " killproc DarwinStreamingServer RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/streaming return $RETVAL } restart() { stop start } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status DarwinStreamingServer ;; restart|reload) restart ;; condrestart) [ -f /var/lock/subsys/streaming ] && restart || : ;; *) echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" exit 1 esac exit $?