#!/sbin/openrc-run

name="Zabbix Agent"
command="/usr/sbin/zabbix_agentd"
command_args="--foreground"
command_background=yes
pidfile="/run/zabbix/zabbix_agentd.pid"
: ${command_user:=zabbix}
: ${command_group:=zabbix}

start_pre() {
	checkpath --owner ${command_user}:${command_group} --directory ${pidfile%/*} /var/log/zabbix
}

depend() {
	need net
	provide zabbix-agent
	use zabbix-server
}
