zabbix_agentd.init 534 B

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