wok-current annotate cups/stuff/etc/init.d/cupsd @ rev 13481

busybox: use slitaz-base httphelper.sh
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Oct 11 13:43:57 2012 +0200 (2012-10-11)
parents c840214a83b8
children d66c8cb687e8
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
pascal@13481 21 sleep 2
pankso@2206 22 rm -f $PIDFILE
pankso@664 23 status
pankso@664 24 ;;
pankso@2208 25 start)
slaxemulator@7043 26 if [ ! -e $PIDFILE ]; then
slaxemulator@7043 27 echo -n "Starting $DESC: $NAME... "
slaxemulator@7043 28 $DAEMON $OPTIONS
slaxemulator@7043 29 status
slaxemulator@7043 30 else
slaxemulator@7043 31 echo -n "Not starting $DESC: $DESC is already running"
slaxemulator@7043 32 false
slaxemulator@7043 33 status
slaxemulator@7043 34 fi
pankso@664 35 ;;
pankso@664 36 *)
pankso@664 37 echo ""
pankso@664 38 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop]"
pankso@664 39 echo ""
pankso@664 40 exit 1
pankso@664 41 ;;
pankso@632 42 esac
pankso@632 43
pankso@632 44 exit 0