wok diff chillispot/stuff/chilli @ rev 25037

Up glza (0.11.4)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat May 21 21:38:29 2022 +0000 (2022-05-21)
parents 1b6281d68d9f
children
line diff
     1.1 --- a/chillispot/stuff/chilli	Fri Sep 10 16:25:17 2010 +0200
     1.2 +++ b/chillispot/stuff/chilli	Sat May 21 21:38:29 2022 +0000
     1.3 @@ -1,5 +1,5 @@
     1.4  #!/bin/sh
     1.5 -# /etc/init.d/chilli : Start, stop and restart ChilliSpot server on SliTaz, at 
     1.6 +# /etc/init.d/chilli : Start, stop and restart ChilliSpot server on SliTaz, at
     1.7  # boot time or with the command line.
     1.8  #
     1.9  # To start ChilliSpot server at boot time, just put chilli in the $RUN_DAEMONS
    1.10 @@ -9,7 +9,7 @@
    1.11  . /etc/daemons.conf
    1.12  
    1.13  NAME=ChilliSpot
    1.14 -DESC="ChilliSpot server"
    1.15 +DESC="$(_ '%s server' ChilliSpot)"
    1.16  DAEMON=/usr/sbin/chilli
    1.17  OPTIONS=$CHILLI_OPTIONS
    1.18  PIDFILE=/var/run/chilli.pid
    1.19 @@ -18,36 +18,36 @@
    1.20  case "$1" in
    1.21    start)
    1.22      if active_pidfile $PIDFILE chilli ; then
    1.23 -      echo "$NAME already running."
    1.24 +      _ '%s is already running.' $NAME
    1.25        exit 1
    1.26      fi
    1.27 +    action 'Starting %s: %s...' "$DESC" $NAME
    1.28      $DAEMON $OPTIONS
    1.29      status
    1.30      ;;
    1.31    stop)
    1.32      if ! active_pidfile $PIDFILE chilli ; then
    1.33 -      echo "$NAME is not running."
    1.34 +      _ '%s is not running.' $NAME
    1.35        exit 1
    1.36      fi
    1.37 -    echo -n "Stopping $DESC: $NAME... "
    1.38 -    kill `cat $PIDFILE`
    1.39 +    action 'Stopping %s: %s...' "$DESC" $NAME
    1.40 +    kill $(cat $PIDFILE)
    1.41      status
    1.42      ;;
    1.43    restart)
    1.44      if ! active_pidfile $PIDFILE chilli ; then
    1.45 -      echo "$NAME is not running."
    1.46 +      _ '%s is not running.' $NAME
    1.47        exit 1
    1.48      fi
    1.49 -    echo -n "Restarting $DESC: $NAME... "
    1.50 -    kill `cat $PIDFILE`
    1.51 +    action 'Restarting %s: %s...' "$DESC" $NAME
    1.52 +    kill $(cat $PIDFILE)
    1.53      sleep 2
    1.54      $DAEMON $OPTIONS
    1.55      status
    1.56      ;;
    1.57    *)
    1.58 -    echo ""
    1.59 -    echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
    1.60 -    echo ""
    1.61 +    emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
    1.62 +    newline
    1.63      exit 1
    1.64      ;;
    1.65  esac