4 # cups Common UNIX Printing System (CUPS)
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 ]; then
30 # See how we were called.
33 # Check if the service is already running?
34 if [ ! -f /var/lock/subsys/cupsd ]; then
36 daemon cupsd -c /etc/cups/cupsd.conf
38 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cupsd
40 msg_already_running CUPS
46 if [ -f /var/lock/subsys/cupsd ]; then
49 rm -f /var/lock/subsys/cupsd >/dev/null 2>&1
60 if [ -f /var/lock/subsys/cupsd ]; then
70 # if program allows reloading without stopping
83 # show "Usage: %s {start|stop|restart|reload|force-reload|status}"
84 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"