#!/bin/sh
#
-#
# cups Common UNIX Printing System (CUPS)
#
# chkconfig: 2345 90 10
# description: Startup/shutdown script for the Common UNIX \
# Printing System (CUPS).
+# processname: cupsd
#
# Source function library
exit 0
fi
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
+start() {
# Check if the service is already running?
if [ ! -f /var/lock/subsys/cups ]; then
msg_starting CUPS
else
msg_already_running CUPS
fi
- ;;
- stop)
+}
+
+stop() {
# Stop daemons.
if [ -f /var/lock/subsys/cups ]; then
msg_stopping CUPS
rm -f /var/lock/subsys/cups >/dev/null 2>&1
else
msg_not_running CUPS
- fi
+ fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
;;
restart)
- $0 stop
- $0 start
- exit $?
+ stop
+ start
;;
reload|force-reload)
if [ -f /var/lock/subsys/cups ]; then
killproc cupsd -HUP
RETVAL=$?
else
- msg_not_running CUPS >&2
+ msg_not_running CUPS
exit 7
fi
;;
status)
- status cupsd
+ status cups cupsd
exit $?
;;
*)
- # show "Usage: %s {start|stop|restart|reload|force-reload|status}"
msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
exit 3
esac