3 # Starts the zabbix_agentd daemon
7 # description: zabbix_agentd long service description
9 # processname: zabbix_agentd
11 # Source function library
12 . /etc/rc.d/init.d/functions
15 . /etc/sysconfig/network
17 # Check that networking is up.
18 if is_yes "${NETWORKING}"; then
19 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
20 msg_network_down "Zabbix Agent"
27 # Get service config - may override defaults
28 [ -f /etc/sysconfig/zabbix_agentd ] && . /etc/sysconfig/zabbix_agentd
30 pidfile="/var/run/zabbix/zabbix_agentd.pid"
33 # Check if the service is already running?
34 if [ -f /var/lock/subsys/zabbix_agentd ]; then
35 msg_already_running "Zabbix Agent"
39 msg_starting "Zabbix Agent"
40 daemon /usr/sbin/zabbix_agentd
42 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/zabbix_agentd
46 if [ ! -f /var/lock/subsys/zabbix_agentd ]; then
47 msg_not_running "Zabbix Agent"
52 msg_stopping "Zabbix Agent"
53 killproc --pidfile $pidfile zabbix_agentd -TERM
54 rm -f /var/lock/subsys/zabbix_agentd
58 if [ ! -f /var/lock/subsys/zabbix_agentd ]; then
59 msg_not_running "Zabbix Agent"
69 # See how we were called.
88 status --pidfile $pidfile zabbix_agentd
92 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"