+++ /dev/null
-#!/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