SmartAudio/package/network/services/dnsmasq/files/dnsmasq_busybox.init

33 lines
566 B
Bash
Executable File

#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2011 OpenWrt.org
START=60
STOP=98
USE_PROCD=1
PROG=/usr/sbin/dnsmasq
CONFIGFILE="/etc/dnsmasq.conf"
start_service() {
procd_open_instance
mkdir -p /var/lib/misc
mkdir -p /var/run/dnsmasq/
touch /var/lib/misc/dnsmasq.leases
touch /var/run/dnsmasq/dnsmasq.conf
procd_set_param command $PROG -C $CONFIGFILE
procd_close_instance
}
stop_service() {
procd_open_instance
if ps | grep [d]nsmasq; then
killall -q -KILL dnsmasq
fi
procd_close_instance
}
restart() {
# stop $@
start $@
}