Created
December 22, 2016 21:06
-
-
Save artixnous/58929a6a561cd3f93d38c70b5e623510 to your computer and use it in GitHub Desktop.
dnsmasq-openrc script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[/etc/init.d/dnsmasq] | |
#!/usr/bin/openrc-run | |
depend() { | |
use net | |
} | |
start() { | |
ebegin "Starting dnsmasq" | |
start-stop-daemon --start --exec /usr/bin/dnsmasq -- ${DNSMASQ_OPTS} | |
eend $? | |
} | |
stop() { | |
ebegin "Stopping dnsmasq" | |
start-stop-daemon --stop --quiet --pidfile /run/dnsmasq.pid | |
eend $? | |
} | |
do_sig() { | |
local sig=$1 ; shift | |
ebegin "$*" | |
start-stop-daemon --signal ${sig} --pidfile /run/dnsmasq.pid | |
eend $? | |
} | |
[/etc/conf.d/dnsmasq] | |
#DNSMASQ_OPTS="--enable-dbus --user=dnsmasq" | |
DNSMASQ_OPTS="" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment