wok diff x11vnc/stuff/x11vnc @ rev 22434

Add sshrc (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Dec 21 12:20:01 2019 +0100 (2019-12-21)
parents 4f1b00a89af1
children
line diff
     1.1 --- a/x11vnc/stuff/x11vnc	Mon Mar 30 12:09:11 2015 +0200
     1.2 +++ b/x11vnc/stuff/x11vnc	Sat Dec 21 12:20:01 2019 +0100
     1.3 @@ -1,5 +1,5 @@
     1.4  #!/bin/sh
     1.5 -# /etc/init.d/x11vnc: Start, stop and restart web server on SliTaz, 
     1.6 +# /etc/init.d/x11vnc: Start, stop and restart web server 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 @@ -7,44 +7,43 @@
    1.11  . /etc/daemons.conf
    1.12  
    1.13  NAME=x11vnc
    1.14 -DESC="VNC server"
    1.15 +DESC="$(_ '%s server' VNC)"
    1.16  DAEMON=/usr/bin/x11vnc
    1.17  OPTIONS=$X11VNC_OPTIONS
    1.18  
    1.19  case "$1" in
    1.20    start)
    1.21      if ps x | grep -v grep | grep -q $DAEMON; then
    1.22 -      echo "$NAME already running."
    1.23 +      _ '%s is already running.' $NAME
    1.24        exit 1
    1.25      fi
    1.26 -    echo -n "Starting $DESC: $NAME... "
    1.27 +    action 'Starting %s: %s...' "$DESC" $NAME
    1.28      $DAEMON $OPTIONS &
    1.29      status
    1.30      ;;
    1.31    stop)
    1.32      if ! ps x | grep -v grep | grep -q $DAEMON; 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 +    action 'Stopping %s: %s...' "$DESC" $NAME
    1.39      killall $(basename $DAEMON)
    1.40      status
    1.41      ;;
    1.42    restart)
    1.43      if ! ps x | grep -v grep | grep -q $DAEMON; 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 "Restarting $DESC: $NAME... "
    1.49 +    action 'Restarting %s: %s...' "$DESC" $NAME
    1.50      killall $(basename $DAEMON)
    1.51      sleep 2
    1.52      $DAEMON $OPTIONS &
    1.53      status
    1.54      ;;
    1.55    *)
    1.56 -    echo ""
    1.57 -    echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
    1.58 -    echo ""
    1.59 +    emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
    1.60 +    newline
    1.61      exit 1
    1.62      ;;
    1.63  esac