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

cups, cups-pam: remove duplicate files with libcups; misc. edits.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Dec 17 05:25:15 2015 +0200 (2015-12-17)
parents 0a8a8c347a7e
children 7f188676b59c
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 action 'Stopping $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 $DESC: $NAME... '
28 $DAEMON $OPTIONS
29 status
30 else
31 action 'Not starting $DESC: $DESC is already running'
32 false; status
33 fi
34 ;;
35 *)
36 emsg "<n><b>Usage:</b> /etc/init.d/$(basename $0) [start|stop]"
37 newline
38 exit 1
39 ;;
40 esac
42 exit 0