wok-current annotate cups/stuff/etc/init.d/cupsd @ rev 14648
cups/stuff/etc/init.d/cupsd: fix shutdown
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Mon Jun 03 20:00:49 2013 +0000 (2013-06-03) |
parents | d66c8cb687e8 |
children | 531807aaf860 |
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 # |
mojo@14648 | 5 # To start daemon at boot time, add cupsd to the $RUN_DAEMONS variable |
mojo@14648 | 6 # 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... " |
mojo@14648 | 20 kill $(pgrep -f cupsd) |
pankso@2206 | 21 rm -f $PIDFILE |
pankso@664 | 22 status |
pankso@664 | 23 ;; |
pankso@2208 | 24 start) |
slaxemulator@7043 | 25 if [ ! -e $PIDFILE ]; then |
slaxemulator@7043 | 26 echo -n "Starting $DESC: $NAME... " |
slaxemulator@7043 | 27 $DAEMON $OPTIONS |
slaxemulator@7043 | 28 status |
slaxemulator@7043 | 29 else |
slaxemulator@7043 | 30 echo -n "Not starting $DESC: $DESC is already running" |
slaxemulator@7043 | 31 false |
slaxemulator@7043 | 32 status |
slaxemulator@7043 | 33 fi |
pankso@664 | 34 ;; |
pankso@664 | 35 *) |
pankso@664 | 36 echo "" |
pankso@664 | 37 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop]" |
pankso@664 | 38 echo "" |
pankso@664 | 39 exit 1 |
pankso@664 | 40 ;; |
pankso@632 | 41 esac |
pankso@632 | 42 |
pankso@632 | 43 exit 0 |