3 # cups Common UNIX Printing System (CUPS)
5 # chkconfig: 2345 90 10
6 # description: Startup/shutdown script for the Common UNIX \
7 # 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 # Check if the service is already running?
32 if [ -f /var/lock/subsys/cups ]; then
33 msg_already_running CUPS
38 daemon /usr/sbin/cupsd -c /etc/cups/cupsd.conf
40 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cups
45 if [ ! -f /var/lock/subsys/cups ]; then
52 rm -f /var/lock/subsys/cups >/dev/null 2>&1
56 if [ ! -f /var/lock/subsys/cups ]; then
68 # See how we were called.
88 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"