packages/admin/zabbix/files/zabbix_agentd.init
Etienne CHAMPETIER f58e0a6407 zabbix: switch zabbix_agentd to procd
run tested on ar71xx

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
2015-07-11 00:26:30 +02:00

21 lines
482 B
Bash
Executable file

#!/bin/sh /etc/rc.common
# Copyright (C) 2008-2011 OpenWrt.org
START=60
USE_PROCD=1
PROG=/usr/sbin/zabbix_agentd
CONFIG=/etc/zabbix_agentd.conf
start_service() {
# Sometimes the agentd config was installed in /etc/zabbix/zabbix_agentd.conf
[ -f /etc/zabbix/zabbix_agentd.conf ] && mv /etc/zabbix/zabbix_agentd.conf ${CONFIG}
[ -f ${CONFIG} ] || return 1
procd_open_instance
procd_set_param command ${PROG} -c ${CONFIG} -f
procd_set_param respawn
procd_close_instance
}