Skip to content

Instantly share code, notes, and snippets.

@artixnous
Created December 22, 2016 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artixnous/58929a6a561cd3f93d38c70b5e623510 to your computer and use it in GitHub Desktop.
Save artixnous/58929a6a561cd3f93d38c70b5e623510 to your computer and use it in GitHub Desktop.
dnsmasq-openrc script
[/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