You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
882 B
54 lines
882 B
#!/bin/bash
|
|
#
|
|
# /etc/rc.d/init.d/slpd
|
|
#
|
|
# Starts the at daemon
|
|
#
|
|
# chkconfig: 345 40 60
|
|
# description: OpenSLP daemon for the Service Location Protocol
|
|
# processname: slpd
|
|
|
|
# Source function library.
|
|
. /etc/rc.d/init.d/functions
|
|
|
|
test -x /usr/sbin/slpd || exit 0
|
|
|
|
RETVAL=0
|
|
|
|
#
|
|
# See how we were called.
|
|
#
|
|
case "$1" in
|
|
start)
|
|
# Check if atd is already running
|
|
if [ ! -f /var/lock/subsys/slpd ]; then
|
|
echo -n 'Starting slpd: '
|
|
daemon /usr/sbin/slpd
|
|
RETVAL=$?
|
|
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/slpd
|
|
echo
|
|
fi
|
|
;;
|
|
stop)
|
|
echo -n 'Stopping slpd: '
|
|
killproc /usr/sbin/slpd
|
|
RETVAL=$?
|
|
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/slpd
|
|
echo
|
|
;;
|
|
reload|restart)
|
|
$0 stop
|
|
$0 start
|
|
RETVAL=$?
|
|
;;
|
|
status)
|
|
status /usr/sbin/slpd
|
|
RETVAL=$?
|
|
;;
|
|
*)
|
|
echo "Usage: /etc/rc.d/init.d/slpd {start|stop|restart|reload|status}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $RETVAL
|