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).
11 # Source function library
12 . /etc/rc.d/init.d/functions
15 . /etc/sysconfig/network
17 # Get service config - may override defaults
18 [ -f /etc/sysconfig/cups ] && . /etc/sysconfig/cups
20 # Check that networking is up.
21 if is_yes "${NETWORKING}"; then
22 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
31 # See how we were called.
34 # Check if the service is already running?
35 if [ ! -f /var/lock/subsys/cups ]; then
37 daemon cupsd -c /etc/cups/cupsd.conf
39 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cups
41 msg_already_running CUPS
46 if [ -f /var/lock/subsys/cups ]; then
49 rm -f /var/lock/subsys/cups >/dev/null 2>&1
60 if [ -f /var/lock/subsys/cups ]; then
65 msg_not_running CUPS >&2
74 # show "Usage: %s {start|stop|restart|reload|force-reload|status}"
75 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"