#!/bin/sh
########################################################################
# Begin dnsmasq
#
# Description : Manage dnsmasq daemon
# Author      : OldCoder
# Version     : 190513
#
########################################################################

### BEGIN INIT INFO
# Provides:            dnsmasq
# Required-Start:
# Should-Start:
# Required-Stop:
# Should-Stop:
# Default-Start:       3 4 5
# Default-Stop:        0 1 2 6
# Short-Description:   Manages the dnsmasq daemon.
# Description:         Manages the dnsmasq daemon.
### END INIT INFO

. /lib/lsb/init-functions

case "$1" in
   start)
      log_info_msg "Starting dnsmasq"
      sureterm dnsmasq
      dnsmasq
      evaluate_retval
      ;;

   restart)
      log_info_msg "Restarting dnsmasq"
      sureterm dnsmasq
      dnsmasq
      evaluate_retval
      ;;

   stop)
      log_info_msg "Stopping dnsmasq"
      sureterm dnsmasq
      evaluate_retval
      ;;

   status)
      statusproc dnsmasq
      ;;

   *)
      echo "Usage: $0 {start|stop|restart|status}"
      exit 1
      ;;

esac

# End /etc/init.d/dnsmasq
