#!/sbin/openrc-run
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/ulogd/files/ulogd.init,v 1.1 2015/05/30 09:38:29 idella4 Exp $

extra_started_commands="reload reopen"

: ${ULOGD_BINARY:=/usr/sbin/ulogd}
: ${ULOGD_PIDFILE:=/run/${SVCNAME}.pid}
: ${ULOGD_OPTS:=--daemon}

depend() {
	before iptables ip6tables ebtables firewall
	after mysql postgresql
}

start() {
	ebegin "Starting ${SVCNAME}"
	start-stop-daemon --start \
		--exec ${ULOGD_BINARY} \
		-- ${ULOGD_OPTS}
	eend $?
}

stop() {
	ebegin "Stopping ${SVCNAME}"
	start-stop-daemon --stop
	eend $?
}

reload() {
	ebegin "Reloading ${SVCNAME} configuration"
	start-stop-daemon --signal USR1
	eend $?
}

reopen() {
	ebegin "Reopening ${SVCNAME} logfiles"
	start-stop-daemon --signal HUP
	eend $?
}
