wok view cups/stuff/etc/init.d/cupsd @ rev 15372

php-auth-pam: php 5.4 patch
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Oct 17 13:16:15 2013 +0000 (2013-10-17)
parents 531807aaf860
children 8ebec64e4191
line source
1 #!/bin/sh
2 # /etc/init.d/cups: Start, stop and restart Cups deamon on SliTaz, at boot
3 # time or with the command line.
4 #
5 # To start daemon at boot time, add cupsd to the $RUN_DAEMONS variable
6 # of /etc/rcS.conf and configure options with /etc/daemons.conf.
7 #
8 . /etc/init.d/rc.functions
9 . /etc/daemons.conf
11 NAME=Cupsd
12 DESC="cups deamon"
13 DAEMON=/usr/sbin/cupsd
14 OPTIONS=$CUPSD_OPTIONS
15 PIDFILE=/var/run/cups/cups.sock
17 case "$1" in
18 stop)
19 echo -n "Stopping $DESC: $NAME... "
20 kill $(pgrep -f cupsd)
21 sleep 2
22 rm -f $PIDFILE
23 status
24 ;;
25 start)
26 pgrep -f cupsd > /dev/null || rm -f $PIDFILE 2> /dev/null
27 if [ ! -e $PIDFILE ]; then
28 echo -n "Starting $DESC: $NAME... "
29 $DAEMON $OPTIONS
30 status
31 else
32 echo -n "Not starting $DESC: $DESC is already running"
33 false
34 status
35 fi
36 ;;
37 *)
38 echo ""
39 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop]"
40 echo ""
41 exit 1
42 ;;
43 esac
45 exit 0