4 # cups Common UNIX Printing System (CUPS)
6 # chkconfig: 2345 90 10
7 # description: Startup/shutdown script for the Common UNIX \
8 # Printing System (CUPS).
12 # Source function library
13 . /etc/rc.d/init.d/functions
16 . /etc/sysconfig/network
18 # Get service config - may override defaults
19 [ -f /etc/sysconfig/cups ] && . /etc/sysconfig/cups
21 # Check that networking is up.
22 if is_yes "${NETWORKING}"; then
23 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
32 # See how we were called.
35 # Check if the service is already running?
36 if [ ! -f /var/lock/subsys/cups ]; then
38 daemon cupsd -c /etc/cups/cupsd.conf
40 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cups
42 msg_already_running CUPS
47 if [ -f /var/lock/subsys/cups ]; then
50 rm -f /var/lock/subsys/cups >/dev/null 2>&1
61 if [ -f /var/lock/subsys/cups ]; then
66 msg_not_running CUPS >&2
75 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"