#!/bin/sh
#
# Start/stop dnsmasq
#
# chkconfig: 345 45 55
# description: DNS forwarder and DHCP server
# processname: dnsmasq
# pidfile: /var/run/dnsmasq.pid
# config: /etc/dnsmasq.conf

start () {
    echo -n "Starting dnsmasq: "
    dnsmasq -C /etc/dnsmasq.conf > /dev/null 2>&1
    echo -e "$RESULT_OK"   ||
    echo -e "$RESULT_FAIL"

}

stop () {
    echo  -e "Stopping dnsmasq: "
    killall dnsmasq    &&
    echo -e "$RESULT_OK"   ||
    echo -e "$RESULT_FAIL"
}

restart () {
    stop;
    start;
}

usage () {
    echo  "Usage: $0 {start|stop|restart}"
}

. /lib/lsb/init-functions
