#!/sbin/runscript
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

: ${ZSV_LOGGER:=syslog-ng}

depend() {
	use clock
	after localmount bootmisc
	provide logger
	before zsv-wait
}

start() {
	ebegin "starting $ZSV_LOGGER via runit"
	zsh -l -c "zsvgen --all-up -f '$ZSV_LOGGER'"
	ewaitfile 10 /run/service/$ZSV_LOGGER/supervise/control
	sv check /run/service/$ZSV_LOGGER
	eend $?
}

stop() {
	true
}