wok diff dnsmasq/stuff/etc/init.d/dnsmasq @ rev 25473

created recipe for get-java8-jre
author Hans-G?nter Theisgen
date Wed Oct 12 10:36:11 2022 +0100 (19 months ago)
parents ff5fd8788cd9
children
line diff
     1.1 --- a/dnsmasq/stuff/etc/init.d/dnsmasq	Fri May 27 01:40:23 2016 +0300
     1.2 +++ b/dnsmasq/stuff/etc/init.d/dnsmasq	Wed Oct 12 10:36:11 2022 +0100
     1.3 @@ -1,6 +1,6 @@
     1.4  #!/bin/sh
     1.5 -# /etc/init.d/dnsmasq: Start, stop and restart DNSmasq daemon on SliTaz, at boot
     1.6 -# time or with the command line.
     1.7 +# /etc/init.d/dnsmasq: Start, stop and restart DNSmasq daemon on SliTaz
     1.8 +# at boot time or with command.
     1.9  #
    1.10  # To start daemon at boot time, just put the right name in the $RUN_DAEMONS
    1.11  # variable of /etc/rcS.conf and configure options with /etc/daemons.conf.
    1.12 @@ -15,42 +15,43 @@
    1.13  PIDFILE=/var/run/dnsmasq.pid
    1.14  
    1.15  case "$1" in
    1.16 -  start)
    1.17 -    if active_pidfile $PIDFILE dnsmasq ; then
    1.18 -      _ '%s is already running.' $NAME
    1.19 -      exit 1
    1.20 -    fi
    1.21 -    action 'Starting %s: %s...' "$DESC" $NAME
    1.22 -    $DAEMON $OPTIONS
    1.23 -    status
    1.24 -    ;;
    1.25 -  stop)
    1.26 -    if ! active_pidfile $PIDFILE dnsmasq ; then
    1.27 -      _ '%s is not running.' $NAME
    1.28 -      exit 1
    1.29 -    fi
    1.30 -    action 'Stopping %s: %s...' "$DESC" $NAME
    1.31 -    kill $(cat $PIDFILE)
    1.32 -    rm $PIDFILE
    1.33 -    status
    1.34 -    ;;
    1.35 -  restart)
    1.36 -    if ! active_pidfile $PIDFILE dnsmasq ; then
    1.37 -      _ '%s is not running.' $NAME
    1.38 -      exit 1
    1.39 -    fi
    1.40 -    action 'Restarting %s: %s...' "$DESC" $NAME
    1.41 -    kill $(cat $PIDFILE)
    1.42 -    rm $PIDFILE
    1.43 -    sleep 2
    1.44 -    $DAEMON $OPTIONS
    1.45 -    status
    1.46 -    ;;
    1.47 -  *)
    1.48 -    emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
    1.49 -    newline
    1.50 -    exit 1
    1.51 -    ;;
    1.52 +	(start)
    1.53 +		if active_pidfile $PIDFILE dnsmasq
    1.54 +		  then
    1.55 +			_ '%s is already running.' $NAME
    1.56 +			exit 1
    1.57 +		fi
    1.58 +		action 'Starting %s: %s...' "$DESC" $NAME
    1.59 +		$DAEMON $OPTIONS
    1.60 +		status
    1.61 +		;;
    1.62 +	(stop)
    1.63 +		if ! active_pidfile $PIDFILE dnsmasq
    1.64 +		  then
    1.65 +			_ '%s is not running.' $NAME
    1.66 +			exit 1
    1.67 +		fi
    1.68 +		action 'Stopping %s: %s...' "$DESC" $NAME
    1.69 +		kill $(cat $PIDFILE)
    1.70 +		status
    1.71 +		;;
    1.72 +	(restart)
    1.73 +		if ! active_pidfile $PIDFILE dnsmasq
    1.74 +		  then
    1.75 +			_ '%s is not running.' $NAME
    1.76 +			exit 1
    1.77 +		fi
    1.78 +		action 'Restarting %s: %s...' "$DESC" $NAME
    1.79 +		kill $(cat $PIDFILE)
    1.80 +		sleep 2
    1.81 +		$DAEMON $OPTIONS
    1.82 +		status
    1.83 +		;;
    1.84 +	(*)
    1.85 +		emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]"
    1.86 +		newline
    1.87 +		exit 1
    1.88 +		;;
    1.89  esac
    1.90  
    1.91  exit 0