wok diff collectd/stuff/collectd @ rev 23735

updated wireless-regdb (2019.06.03 -> 2020.04.29)
author Hans-G?nter Theisgen
date Fri May 01 09:55:09 2020 +0100 (2020-05-01)
parents 55d75f0e3533
children
line diff
     1.1 --- a/collectd/stuff/collectd	Thu Nov 03 22:14:55 2011 +0100
     1.2 +++ b/collectd/stuff/collectd	Fri May 01 09:55:09 2020 +0100
     1.3 @@ -1,5 +1,5 @@
     1.4  #!/bin/sh
     1.5 -# /etc/init.d/collectd : Start, stop and restart Collectd server on SliTaz, at 
     1.6 +# /etc/init.d/collectd : Start, stop and restart Collectd server on SliTaz, at
     1.7  # boot time or with the command line.
     1.8  #
     1.9  # To start Collectd server at boot time, just put collectd in the $RUN_DAEMONS
    1.10 @@ -9,7 +9,7 @@
    1.11  . /etc/daemons.conf
    1.12  
    1.13  NAME=collectd
    1.14 -DESC="Statistics collection daemon"
    1.15 +DESC="$(_ 'Statistics collection daemon')"
    1.16  DAEMON=/usr/sbin/collectd
    1.17  OPTIONS=""
    1.18  PIDFILE=/var/run/collectd.pid
    1.19 @@ -17,37 +17,36 @@
    1.20  case "$1" in
    1.21    start)
    1.22      if active_pidfile $PIDFILE collectd ; then
    1.23 -      echo "$NAME already running."
    1.24 +      _ '%s is already running.' $NAME
    1.25        exit 1
    1.26      fi
    1.27 -    echo -n "Starting $DESC: $NAME... "
    1.28 +    action 'Starting %s: %s...' "$DESC" $NAME
    1.29      $DAEMON $OPTIONS
    1.30      status
    1.31      ;;
    1.32    stop)
    1.33      if ! active_pidfile $PIDFILE collectd ; then
    1.34 -      echo "$NAME is not running."
    1.35 +      _ '%s is not running.' $NAME
    1.36        exit 1
    1.37      fi
    1.38 -    echo -n "Stopping $DESC: $NAME... "
    1.39 -    kill `cat $PIDFILE`
    1.40 +    action 'Stopping %s: %s...' "$DESC" $NAME
    1.41 +    kill $(cat $PIDFILE)
    1.42      status
    1.43      ;;
    1.44    restart)
    1.45      if ! active_pidfile $PIDFILE collectd ; then
    1.46 -      echo "$NAME is not running."
    1.47 +      _ '%s is not running.' $NAME
    1.48        exit 1
    1.49      fi
    1.50 -    echo -n "Restarting $DESC: $NAME... "
    1.51 -    kill `cat $PIDFILE`
    1.52 +    action 'Restarting %s: %s...' "$DESC" $NAME
    1.53 +    kill $(cat $PIDFILE)
    1.54      sleep 2
    1.55      $DAEMON $OPTIONS
    1.56      status
    1.57      ;;
    1.58    *)
    1.59 -    echo ""
    1.60 -    echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
    1.61 -    echo ""
    1.62 +    emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
    1.63 +    newline
    1.64      exit 1
    1.65      ;;
    1.66  esac