wok diff distcc/stuff/distccd @ rev 19980

Up kriss_feed (8.7)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jun 15 08:14:05 2017 +0200 (2017-06-15)
parents 0d8a1a3edc72
children
line diff
     1.1 --- a/distcc/stuff/distccd	Sun May 18 20:24:07 2014 +0000
     1.2 +++ b/distcc/stuff/distccd	Thu Jun 15 08:14:05 2017 +0200
     1.3 @@ -1,5 +1,5 @@
     1.4  #!/bin/sh
     1.5 -# /etc/init.d/distccd: Start, stop and restart Distcc daemon on SliTaz, 
     1.6 +# /etc/init.d/distccd: Start, stop and restart Distcc daemon on SliTaz,
     1.7  # at boot time or with the command line. Daemons options are configured
     1.8  # with /etc/daemons.conf
     1.9  #
    1.10 @@ -10,7 +10,7 @@
    1.11  {
    1.12  	if [ -s /etc/distcc/hosts.allow ]; then
    1.13  		for i in $(cat /etc/distcc/clients.allow); do
    1.14 -			( echo $i | grep -q '^#' ) && continue 
    1.15 +			( echo $i | grep -q '^#' ) && continue
    1.16  			ALLOW_HOST="$ALLOW_HOST --allow $i"
    1.17  		done
    1.18  	else
    1.19 @@ -20,7 +20,7 @@
    1.20  }
    1.21  
    1.22  NAME=Distccd
    1.23 -DESC="Distcc daemon"
    1.24 +DESC="$(_ '%s daemon' Distcc)"
    1.25  DAEMON="/usr/bin/distccd"
    1.26  LOGFILE="/var/log/distccd/distccd.log"
    1.27  PIDFILE="/var/run/distccd/distccd.pid"
    1.28 @@ -35,35 +35,34 @@
    1.29  case "$1" in
    1.30    start)
    1.31      if active_pidfile $PIDFILE distccd ; then
    1.32 -      echo "$NAME already running."
    1.33 +      _ '%s is already running.' $NAME
    1.34        exit 1
    1.35      fi
    1.36 -    echo -n "Starting $DESC: $NAME... "
    1.37 -    $DAEMON $OPTIONS 
    1.38 +    action 'Starting %s: %s...' "$DESC" $NAME
    1.39 +    $DAEMON $OPTIONS
    1.40      status
    1.41      ;;
    1.42    stop)
    1.43      if ! active_pidfile $PIDFILE distccd ; then
    1.44 -      echo "$NAME is not running."
    1.45 +      _ '%s is not running.' $NAME
    1.46        exit 1
    1.47      fi
    1.48 -    echo -n "Stopping $DESC: $NAME... "
    1.49 +    action 'Stopping %s: %s...' "$DESC" $NAME
    1.50      kill -15 $(cat $PIDFILE)
    1.51      status
    1.52      ;;
    1.53    restart)
    1.54      if ! active_pidfile $PIDFILE distccd ; then
    1.55 -      echo "$NAME is not running."
    1.56 +      _ '%s is not running.' $NAME
    1.57        exit 1
    1.58      fi
    1.59 -    echo -n "Restarting $DESC: $NAME... "
    1.60 +    action 'Restarting %s: %s...' "$DESC" $NAME
    1.61      $DAEMON $OPTIONS -k restart
    1.62      status
    1.63      ;;
    1.64    *)
    1.65 -    echo ""
    1.66 -    echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
    1.67 -    echo ""
    1.68 +    emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
    1.69 +    newline
    1.70      exit 1
    1.71      ;;
    1.72  esac