SOURCES: ffserver.init (NEW) - from template.init of rc-scripts - ...

glen glen at pld-linux.org
Sun Apr 16 17:02:43 CEST 2006


Author: glen                         Date: Sun Apr 16 15:02:43 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- from template.init of rc-scripts
- LSB conformance maybe broken i'm not good at it

---- Files affected:
SOURCES:
   ffserver.init (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/ffserver.init
diff -u /dev/null SOURCES/ffserver.init:1.1
--- /dev/null	Sun Apr 16 17:02:43 2006
+++ SOURCES/ffserver.init	Sun Apr 16 17:02:38 2006
@@ -0,0 +1,70 @@
+#!/bin/sh
+#
+# ffserver	FFserver video server
+#
+# chkconfig:	345 40 60
+#
+# description:	FFserver video server
+#
+# $Id$
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Get service config - may override defaults
+[ -f /etc/sysconfig/ffserver ] && . /etc/sysconfig/ffserver
+
+# Check that networking is up.
+if is_yes "${NETWORKING}"; then
+	if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+		msg_network_down ffserver
+		exit 1
+	fi
+else
+	exit 0
+fi
+
+# See how we were called.
+case "$1" in
+  start)
+	# Check if the service is already running?
+	if [ ! -f /var/lock/subsys/ffserver ]; then
+		msg_starting ffserver
+		daemon ffserver
+		RETVAL=$?
+		[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ffserver
+	else
+		msg_already_running ffserver
+	fi
+	;;
+  stop)
+	if [ -f /var/lock/subsys/ffserver ]; then
+		# Stop daemons.
+		msg_stopping ffserver
+		killproc ffserver
+		rm -f /var/lock/subsys/ffserver
+	else
+		msg_not_running ffserver
+	fi
+	;;
+  restart)
+	$0 stop
+	$0 start
+	exit $?
+	;;
+  status)
+	status ffserver
+	RETVAL=$?
+	;;
+  *)
+	msg_usage "$0 {start|stop|restart|status}"
+	exit 3
+esac
+
+exit $RETVAL
+
+# This must be last line !
+# vi:syntax=sh
================================================================


More information about the pld-cvs-commit mailing list