5 # Startup/shutdown script for the Common UNIX Printing System (CUPS).
7 # Linux chkconfig stuff:
9 # chkconfig: 0235 99 00
10 # description: Startup/shutdown script for the Common UNIX \
11 # Printing System (CUPS).
13 # Copyright 1997-2000 by Easy Software Products, all rights reserved.
15 # These coded instructions, statements, and computer programs are the
16 # property of Easy Software Products and are protected by Federal
17 # copyright law. Distribution and use rights are outlined in the file
18 # "LICENSE.txt" which should have been included with this file. If this
19 # file is missing or damaged please contact Easy Software Products
22 # Attn: CUPS Licensing Information
23 # Easy Software Products
24 # 44141 Airport View Drive, Suite 204
25 # Hollywood, Maryland 20636-3111 USA
27 # Voice: (301) 373-9603
28 # EMail: cups-info@cups.org
29 # WWW: http://www.cups.org
32 # See what program to use for configuration stuff...
43 # The verbose flag controls the printing of the names of
44 # daemons as they are started.
45 if $IS_ON verbose; then
51 # See if the CUPS server is running...
53 IRIX* | HP-UX | SunOS)
54 pid=`ps -e | awk '{print $1,$4}' | grep cupsd | awk '{print $1}'`
57 pid=`ps -e | awk '{print $1,$5}' | grep cupsd | awk '{print $1}'`
60 pid=`ps ax | awk '{print $1,$5}' | grep cupsd | awk '{print $1}'`
67 # Start or stop the CUPS server based upon the first argument to the script.
69 start | restart | reload)
70 if test "$pid" != ""; then
73 $ECHO "cups: scheduler restarted."
76 $ECHO "cups: scheduler stopped."
83 $ECHO "cups: scheduler started."
89 if test "$pid" != ""; then
91 $ECHO "cups: scheduler stopped."
96 if test "$pid" != ""; then
97 echo "cups: Scheduler is running."
99 echo "cups: Scheduler is not running."
104 echo "Usage: cups {reload|restart|start|status|stop}"