Репозитории ALT
Группа :: Сети/Прочее
Пакет: whoson
Главная Изменения Спек Патчи Исходники Загрузить Gear Bugs and FR Repocop
#!/bin/sh
#
# whosond Start/Stop whosond server
#
# chkconfig: 345 40 65
# description: whosond - implementation of WHOSON protocol
#
# processname: whosond
# config: /etc/whoson.conf
# Do not load RH compatibility interface.
WITHOUT_RC_COMPAT=1
# Source function library
. /etc/rc.d/init.d/functions
# Get network config
. /etc/sysconfig/network
# Get service config
SourceIfNotEmpty /etc/sysconfig/whoson
LOCKFILE=/var/lock/subsys/whosond
RETVAL=0
start()
{
start_daemon --lockfile "$LOCKFILE" --expect-user nobody whosond
RETVAL=$?
return $RETVAL
}
stop()
{
stop_daemon --lockfile "$LOCKFILE" --expect-user nobody whosond
RETVAL=$?
return $RETVAL
}
restart()
{
stop
start
}
reload()
{
msg_reloading whosond
stop_daemon --pidfile "$PIDFILE" --expect-user nobody -HUP whosond
RETVAL=$?
return $RETVAL
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
condreload)
if [ -e "$LOCKFILE" ]; then
reload
fi
;;
status)
status --expect-user nobody whosond
RETVAL=$?
;;
*)
msg_usage "Usage: ${0##*/} {start|stop|status|reload|restart|condstop|condrestart|condreload}"
RETVAL=1
esac
exit $RETVAL