wok annotate cups/stuff/etc/init.d/cupsd @ rev 2206
cups: up to 13.9, fix web interface and dependencies
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Feb 10 16:37:43 2009 +0100 (2009-02-10) |
parents | 2f416a878f2e |
children | 9d04e92aeeb7 |
rev | line source |
---|---|
pankso@632 | 1 #!/bin/sh |
pankso@632 | 2 # /etc/init.d/cups: Start, stop and restart Cups deamon on SliTaz, at boot |
pankso@632 | 3 # time or with the command line. |
pankso@632 | 4 # |
pankso@632 | 5 # To start daemon at boot time, just put the right name in the $RUN_DAEMONS |
pankso@632 | 6 # variable of /etc/rcS.conf and configure options with /etc/daemons.conf. |
pankso@632 | 7 # |
pankso@632 | 8 . /etc/init.d/rc.functions |
pankso@632 | 9 . /etc/daemons.conf |
pankso@632 | 10 |
pankso@632 | 11 NAME=Cupsd |
pankso@632 | 12 DESC="cups deamon" |
pankso@632 | 13 DAEMON=/usr/sbin/cupsd |
pankso@632 | 14 OPTIONS=$CUPSD_OPTIONS |
pankso@632 | 15 PIDFILE=/var/run/cups/cups.sock |
pankso@632 | 16 |
pankso@632 | 17 case "$1" in |
pankso@664 | 18 stop) |
pankso@664 | 19 echo -n "Stopping $DESC: $NAME... " |
pankso@664 | 20 killall -q cupsd |
pankso@2206 | 21 rm -f $PIDFILE |
pankso@664 | 22 status |
pankso@664 | 23 ;; |
pankso@2206 | 24 start|restart) |
pankso@2206 | 25 killall -q cupsd |
pankso@2206 | 26 rm -f $PIDFILE |
pankso@664 | 27 echo -n "Starting $DESC: $NAME... " |
pankso@664 | 28 $DAEMON $OPTIONS |
pankso@664 | 29 status |
pankso@664 | 30 ;; |
pankso@664 | 31 *) |
pankso@664 | 32 echo "" |
pankso@664 | 33 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop]" |
pankso@664 | 34 echo "" |
pankso@664 | 35 exit 1 |
pankso@664 | 36 ;; |
pankso@632 | 37 esac |
pankso@632 | 38 |
pankso@632 | 39 exit 0 |