]> git.pld-linux.org Git - packages/NewsCache.git/commitdiff
- added, renamed: NewsCache-init -> NewsCache.init
authortwittner <twittner@pld-linux.org>
Sun, 4 Apr 2004 17:51:30 +0000 (17:51 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    NewsCache.init -> 1.1

NewsCache.init [new file with mode: 0755]

diff --git a/NewsCache.init b/NewsCache.init
new file mode 100755 (executable)
index 0000000..a81227e
--- /dev/null
@@ -0,0 +1,70 @@
+#!/bin/sh
+#
+# newscache            Proxy DNS Daemon
+#
+# chkconfig:   345 90 10
+#
+# description: Proxy DNS Daemon
+#
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get network config
+. /etc/sysconfig/network
+
+# Default parameters
+
+# Get service config - may override defaults
+[ -f /etc/sysconfig/newscache ] && . /etc/sysconfig/newscache
+
+# 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 NewsCache
+               exit 1
+       fi
+else
+       exit 0
+fi
+
+test -x /usr/sbin/newscache || exit 0
+
+RETVAL=0
+case "$1" in
+  start)
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/newscache ]; then
+               msg_starting NewsCache
+               daemon newscache 
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/newscache
+       else
+               msg_already_running NewsCache
+       fi
+       ;;
+  stop)
+       if [ -f /var/lock/subsys/newscache ]; then
+               msg_stopping NewsCache
+               killproc newscache
+               rm -f /var/lock/subsys/newscache >/dev/null 2>&1
+       else
+               msg_not_running NewsCache
+       fi
+       ;;
+  restart)
+       $0 stop
+       $0 start
+       exit $?
+       ;;
+  status)
+       status newscached
+       exit $?
+       ;;
+  *)
+       # show "Usage: %s {start|stop|restart|restart}"
+       msg_usage "$0 {start|stop|restart|restart}"
+       exit 3
+esac
+
+exit $RETVAL
This page took 0.083849 seconds and 4 git commands to generate.