#!/bin/sh # $Id: template,v 1.3 2003/05/21 17:47:00 ldv Exp $ # # slpd OpenSLP Service Location Protocol daemon # # chkconfig: 345 90 10 # description: OpenSLP - free implementation \ # of Service Location Protocol. \ # This is OPenSLP daemon. # processname: slpd # config: /etc/slp.conf # pidfile: /var/run/slpd.pid # Do not load RH compatibility interface. WITHOUT_RC_COMPAT=1 # Source function library. . /etc/init.d/functions LOCKFILE=/var/lock/subsys/slpd RETVAL=0 start() { start_daemon --lockfile "$LOCKFILE" -- slpd RETVAL=$? return $RETVAL } stop() { stop_daemon --lockfile "$LOCKFILE" -- slpd RETVAL=$? return $RETVAL } restart() { stop start } reload() { msg_reloading template stop_daemon --expect-user root -HUP -- slpd RETVAL=$? return $RETVAL } # See how we were called. case "$1" in start) start ;; stop) stop ;; reload) reload ;; restart) restart ;; condstop) if [ -e "$LOCKFILE" ]; then stop fi ;; condrestart) if [ -e "$LOCKFILE" ]; then restart fi ;; condreload) if [ -e "$LOCKFILE" ]; then reload fi ;; status) status -- slpd RETVAL=$? ;; *) msg_usage "${0##*/} {start|stop|reload|restart|condstop|condrestart|condreload|status}" RETVAL=1 esac exit $RETVAL