blob: ea886346e7c821f8cd63032e2bc15876cde0eb88 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#!/bin/sh /etc/rc.common
2# Copyright (C) 2008-2011 OpenWrt.org
3
4START=60
5
6USE_PROCD=1
7PROG=/usr/sbin/zabbix_agentd
8CONFIG=/etc/zabbix_agentd.conf
9
10start_service() {
11 # Sometimes the agentd config was installed in /etc/zabbix/zabbix_agentd.conf
12 [ -f /etc/zabbix/zabbix_agentd.conf ] && mv /etc/zabbix/zabbix_agentd.conf ${CONFIG}
13
14 [ -f ${CONFIG} ] || return 1
15
16 procd_open_instance
17 procd_set_param command ${PROG} -c ${CONFIG} -f
18 procd_set_param respawn
19 procd_set_param stdout 1
20 procd_set_param stderr 1
21 procd_close_instance
22}
23