wok-next annotate cups/stuff/etc/init.d/cupsd @ rev 677
obconf: update-mime-info and set name
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Apr 24 21:03:14 2008 +0200 (2008-04-24) |
parents | ca2ef094c5d6 |
children | 2d810185f0ce |
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@664 | 21 status |
pankso@664 | 22 ;; |
pankso@664 | 23 start) |
pankso@664 | 24 if ps | grep $DAEMON; then |
pankso@664 | 25 echo "$NAME is already running... " |
pankso@664 | 26 exit 0 |
pankso@664 | 27 fi |
pankso@664 | 28 echo -n "Starting $DESC: $NAME... " |
pankso@664 | 29 $DAEMON $OPTIONS |
pankso@664 | 30 status |
pankso@664 | 31 ;; |
pankso@664 | 32 *) |
pankso@664 | 33 echo "" |
pankso@664 | 34 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop]" |
pankso@664 | 35 echo "" |
pankso@664 | 36 exit 1 |
pankso@664 | 37 ;; |
pankso@632 | 38 esac |
pankso@632 | 39 |
pankso@632 | 40 exit 0 |