# processname: dhcdbd
# pidfile: /var/run/dhcdbd.pid
# config: /etc/dbus-1/system.d/dhcdbd.conf
-
+#
+# $Id$
# Source function library
. /etc/rc.d/init.d/functions
exit 0
fi
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
+start() {
if [ -f /var/lock/subsys/messagebus ]; then
if [ ! -f /var/lock/subsys/dhcdbd ]; then
msg_starting dhcdbd
else
msg_not_running messagebus
fi
- ;;
- stop)
+}
+
+stop() {
msg_stopping dhcdbd
if [ -f /var/run/dhcdbd.pid ]; then
checkpid `cat /var/run/dhcdbd.pid` >/dev/null 2>&1
else
msg_not_running messagebus
fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
;;
status)
status dhcdbd
fi
fi
;;
- restart)
- $0 stop
- $0 start
- ;;
*)
msg_usage "$0 {start|stop|restart|status}"
exit 3