#!/sbin/openrc-run
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

depend() {
	need net
}

start() {
	ebegin "Starting smartdns daemon"
	start-stop-daemon --start --exec /usr/sbin/smartdns \
		--pidfile /run/smartdns.pid \
		-- -p /run/smartdns.pid \
		${SMART_DNS_OPTS}
	eend $*
}

stop() {
	ebegin "Stopping smartdns daemon"
	start-stop-daemon --stop --exec /usr/sbin/smartdns \
		--pidfile /run/smartdns.pid
	eend $?
}

