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

depend() {
	need net
	use logger dns
	after bootmisc
}

start() {
	ebegin "Starting inadyn"
	start-stop-daemon --start --chuid inadyn --exec /usr/sbin/inadyn \
	    --pidfile /var/run/inadyn.pid --make-pidfile --background \
	    -- --syslog --input_file /etc/inadyn.conf
	eend $?
}

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