view scripts/memcached.sysv~ @ 0:30782bb1fc04 MEMCACHED_1_2_3

memcached-1.2.3
author Maxim Dounin <mdounin@mdounin.ru>
date Sun, 23 Sep 2007 03:58:34 +0400
parents
children
line wrap: on
line source

#! /bin/sh
#
# chkconfig: - 55 45
# description:	The arpwatch daemon attempts to keep track of ethernet/ip \
#		address pairings.
# processname: arpwatch

# Source function library.
. /etc/rc.d/init.d/functions

# Get config.
. /etc/sysconfig/network

if [ -f /etc/sysconfig/arpwatch ];then 
	. /etc/sysconfig/arpwatch
fi

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

RETVAL=0
prog="arpwatch"

start () {
	echo -n $"Starting $prog: "
	daemon arpwatch $OPTIONS
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/arpwatch
}
stop () {
	echo -n $"Stopping $prog: "
	killproc arpwatch
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/arpwatch
}

restart () {
        stop
        start
}


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

exit $?