Sophie

Sophie

distrib > Arklinux > devel > x86_64 > media > main-src > by-pkgid > eeaedb5b80e28b5e3a711b2d17a32447 > files > 6

DSS-6.0.3-1ark.src.rpm

#! /bin/sh
#
# streaming    Start/Stop MPEG-4 streaming server admin web interface
#
# chkconfig: - 13 87
# description: Web admin interface for the MPEG-4 video and audio streaming
#              server.
# processname: streamingadminserver.pl


# 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="streamingadminserver"

# Check that networking is up.
if [ "$NETWORKING" = "no" ]
then
	exit 0
fi

RETVAL=0

start() {
        echo -n $"Starting $prog: "
        daemon streamingadminserver.pl
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/streamingadmin
	return $RETVAL
}


stop() {
        echo -n $"Stopping $prog: "
        killproc streamingadminserver.pl
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/streamingadmin
	return $RETVAL
}

restart() {
	stop
	start
}

# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  status)
	status streamingadminserver.pl
	;;
  restart|reload)
	restart
	;;
  condrestart)
	[ -f /var/lock/subsys/streamingadmin ] && restart || :
	;;
  *)
	echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
	exit 1
esac

exit $?