wok-stable diff cups/stuff/etc/init.d/cupsd @ rev 664

Fixed cups install dir (Thanks Erjo) and fix init script
author Christophe Lincoln <pankso@slitaz.org>
date Wed Apr 23 01:01:46 2008 +0200 (2008-04-23)
parents ca2ef094c5d6
children 2d810185f0ce
line diff
     1.1 --- a/cups/stuff/etc/init.d/cupsd	Mon Apr 21 15:45:27 2008 +0200
     1.2 +++ b/cups/stuff/etc/init.d/cupsd	Wed Apr 23 01:01:46 2008 +0200
     1.3 @@ -15,26 +15,26 @@
     1.4  PIDFILE=/var/run/cups/cups.sock
     1.5  
     1.6  case "$1" in
     1.7 -  stop)
     1.8 -    echo -n "Stopping $DESC: $NAME... "
     1.9 -    killall $DAEMON 2>/dev/null
    1.10 -    rm -f $PIDFILE
    1.11 -    status
    1.12 -    ;;
    1.13 -  start|restart)
    1.14 -    echo -n "Restarting $DESC: $NAME... "
    1.15 -    killall $DAEMON 2>/dev/null
    1.16 -    rm -f $PIDFILE
    1.17 -    sleep 2
    1.18 -    $DAEMON $OPTIONS
    1.19 -    status
    1.20 -    ;;
    1.21 -  *)
    1.22 -    echo ""
    1.23 -    echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
    1.24 -    echo ""
    1.25 -    exit 1
    1.26 -    ;;
    1.27 +	stop)
    1.28 +		echo -n "Stopping $DESC: $NAME... "
    1.29 +		killall -q cupsd
    1.30 +		status
    1.31 +		;;
    1.32 +	start)
    1.33 +		if ps | grep $DAEMON; then
    1.34 +			echo "$NAME is already running... "
    1.35 +			exit 0
    1.36 +		fi
    1.37 +		echo -n "Starting $DESC: $NAME... "
    1.38 +		$DAEMON $OPTIONS
    1.39 +		status
    1.40 +		;;
    1.41 +	*)
    1.42 +		echo ""
    1.43 +		echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop]"
    1.44 +		echo ""
    1.45 +		exit 1
    1.46 +		;;
    1.47  esac
    1.48  
    1.49  exit 0