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

Up firefox-official-* (62.0.3)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Oct 28 16:56:56 2018 +0100 (2018-10-28)
parents 7f188676b59c
children
line source
1 #!/bin/sh
2 # /etc/init.d/cups: Start, stop and restart CUPS daemon 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="$(_ '%s daemon' CUPS)"
13 DAEMON=/usr/sbin/cupsd
14 OPTIONS=$CUPSD_OPTIONS
15 PIDFILE=/var/run/cups/cups.sock
17 case "$1" in
18 stop)
19 action 'Stopping %s: %s...' "$DESC" $NAME
20 kill $(pgrep -f cupsd)
21 sleep 2
22 [ -e /var/run/cups/cups.sock ] && rm -f $PIDFILE
23 status
24 ;;
25 start)
26 if ! active_pidfile $PIDFILE cupsd 2>/dev/null; then
27 action 'Starting %s: %s...' "$DESC" $NAME
28 $DAEMON $OPTIONS
29 status
30 else
31 _ '%s is already running.' $NAME
32 fi
33 ;;
34 *)
35 emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop]"
36 newline
37 exit 1
38 ;;
39 esac
41 exit 0