wok-next diff cups/stuff/etc/init.d/cupsd @ rev 18925
description.txt should end with 0x0A byte (Carriage Return, Enter) to not glue with the next description in descriptions.txt.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Feb 25 15:02:38 2016 +0200 (2016-02-25) |
parents | 0a8a8c347a7e |
children | 7f188676b59c |
line diff
1.1 --- a/cups/stuff/etc/init.d/cupsd Fri Dec 06 20:49:37 2013 +0000 1.2 +++ b/cups/stuff/etc/init.d/cupsd Thu Feb 25 15:02:38 2016 +0200 1.3 @@ -1,8 +1,8 @@ 1.4 #!/bin/sh 1.5 -# /etc/init.d/cups: Start, stop and restart Cups deamon on SliTaz, at boot 1.6 +# /etc/init.d/cups: Start, stop and restart CUPS deamon on SliTaz, at boot 1.7 # time or with the command line. 1.8 # 1.9 -# To start daemon at boot time, add cupsd to the $RUN_DAEMONS variable 1.10 +# To start daemon at boot time, add 'cupsd' to the $RUN_DAEMONS variable 1.11 # of /etc/rcS.conf and configure options with /etc/daemons.conf. 1.12 # 1.13 . /etc/init.d/rc.functions 1.14 @@ -16,27 +16,25 @@ 1.15 1.16 case "$1" in 1.17 stop) 1.18 - echo -n "Stopping $DESC: $NAME... " 1.19 + action 'Stopping $DESC: $NAME... ' 1.20 kill $(pgrep -f cupsd) 1.21 sleep 2 1.22 [ -e /var/run/cups/cups.sock ] && rm -f $PIDFILE 1.23 status 1.24 ;; 1.25 start) 1.26 - if ! active_pidfile $PIDFILE cupsd 2> /dev/null ; then 1.27 - echo -n "Starting $DESC: $NAME... " 1.28 + if ! active_pidfile $PIDFILE cupsd 2>/dev/null; then 1.29 + action 'Starting $DESC: $NAME... ' 1.30 $DAEMON $OPTIONS 1.31 status 1.32 else 1.33 - echo -n "Not starting $DESC: $DESC is already running" 1.34 - false 1.35 - status 1.36 + action 'Not starting $DESC: $DESC is already running' 1.37 + false; status 1.38 fi 1.39 ;; 1.40 *) 1.41 - echo "" 1.42 - echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop]" 1.43 - echo "" 1.44 + emsg "<n><b>Usage:</b> /etc/init.d/$(basename $0) [start|stop]" 1.45 + newline 1.46 exit 1 1.47 ;; 1.48 esac