#!/usr/bin/openrc-run
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the BSD License

extra_started_commands="reload dump"

supervisor=supervise-daemon
pidfile=/run/xinetd.pid
command=xinetd
command_args="${XINETD_OPTS} -dontfork"

depend() {
	use net
}

do_sig() {
	local sig=$1 ; shift
	ebegin "$*"
	supervise-daemon "$command" --signal ${sig}
	eend $?
}
reload() { do_sig HUP  "Reloading configuration" ; }
dump()   { do_sig USR1 "Dumping configuration" ; }
