exit 0
fi
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
+if [ "$1" != "stop" ]; then
+ check_portmapper || { nls "Error: portmap isn't running" && exit 0; }
+fi
+
+start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/famd ]; then
msg_starting "File Alteration Monitor"
else
msg_already_running "File Alteration Monitor"
fi
- ;;
- stop)
+}
+
+stop() {
# Stop daemons.
if [ -f /var/lock/subsys/famd ]; then
msg_stopping "File Alteration Monitor"
else
msg_not_running "File Alteration Monitor"
fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
status)
status famd
exit $?
;;
restart|force-reload)
- $0 stop
- $0 start
- exit $?
+ stop
+ start
;;
*)
msg_usage "$0 {start|stop|restart|force-reload|status}"