wok-6.x diff clamav/stuff/daemon-clamd @ rev 21579

updated python-gevent (0.13.8 -> 1.4.0)
author Hans-G?nter Theisgen
date Sun May 19 16:11:22 2019 +0100 (2019-05-19)
parents e43926392669
children f9740579460f
line diff
     1.1 --- a/clamav/stuff/daemon-clamd	Fri Mar 28 20:33:41 2014 +0000
     1.2 +++ b/clamav/stuff/daemon-clamd	Sun May 19 16:11:22 2019 +0100
     1.3 @@ -1,5 +1,5 @@
     1.4  #!/bin/sh
     1.5 -# /etc/init.d/daemon-name: Start, stop and restart daemon 
     1.6 +# /etc/init.d/daemon-name: Start, stop and restart daemon
     1.7  # on SliTaz, at boot time or with the command line.
     1.8  #
     1.9  # To start daemon at boot time, just put the right name in the $RUN_DAEMONS
    1.10 @@ -9,7 +9,7 @@
    1.11  . /etc/daemons.conf
    1.12  
    1.13  NAME=Clamd
    1.14 -DESC="clamav daemon"
    1.15 +DESC="$(_ '%s daemon' clamav)"
    1.16  DAEMON=/usr/sbin/clamd
    1.17  OPTIONS=$CLAMD_OPTIONS
    1.18  PIDFILE=/run/clamav/clamd.pid
    1.19 @@ -17,39 +17,38 @@
    1.20  case "$1" in
    1.21    start)
    1.22      if active_pidfile $PIDFILE clamd ; 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 -    $DAEMON $OPTIONS 
    1.29 +    action 'Starting %s: %s...' "$DESC" $NAME
    1.30 +    $DAEMON $OPTIONS
    1.31      status
    1.32      ;;
    1.33    stop)
    1.34      if ! active_pidfile $PIDFILE clamd ; then
    1.35 -      echo "$NAME is not running."
    1.36 +      _ '%s is not running.' $NAME
    1.37        exit 1
    1.38      fi
    1.39 -    echo -n "Stopping $DESC: $NAME... "
    1.40 -    kill `cat $PIDFILE`
    1.41 +    action 'Stopping %s: %s...' "$DESC" $NAME
    1.42 +    kill $(cat $PIDFILE)
    1.43      rm $PIDFILE
    1.44      status
    1.45      ;;
    1.46    restart)
    1.47      if ! active_pidfile $PIDFILE clamd ; then
    1.48 -      echo "$NAME is not running."
    1.49 +      _ '%s is not running.' $NAME
    1.50        exit 1
    1.51      fi
    1.52 -    echo -n "Restarting $DESC: $NAME... "
    1.53 -    kill `cat $PIDFILE`
    1.54 +    action 'Restarting %s: %s...' "$DESC" $NAME
    1.55 +    kill $(cat $PIDFILE)
    1.56      rm $PIDFILE
    1.57      sleep 2
    1.58      $DAEMON $OPTIONS
    1.59      status
    1.60      ;;
    1.61    *)
    1.62 -    echo ""
    1.63 -    echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
    1.64 -    echo ""
    1.65 +    emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
    1.66 +    newline
    1.67      exit 1
    1.68      ;;
    1.69  esac