3 # Starts the zabbix_agentd daemon
7 # description: zabbix_agentd long service description
9 # processname: zabbix_agentd
10 # processname: zabbix_agentd
12 # Source function library
13 . /etc/rc.d/init.d/functions
16 . /etc/sysconfig/network
18 # Check that networking is up.
19 if is_yes "${NETWORKING}"; then
20 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
21 msg_network_down "Zabbix Agent"
28 # Get service config - may override defaults
29 [ -f /etc/sysconfig/zabbix_agentd ] && . /etc/sysconfig/zabbix_agentd
31 pidfile="/var/run/zabbix/zabbix_agentd.pid"
34 # Check if the service is already running?
35 if [ -f /var/lock/subsys/zabbix_agentd ]; then
36 msg_already_running "Zabbix Agent"
40 msg_starting "Zabbix Agent"
41 daemon /usr/sbin/zabbix_agentd
43 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/zabbix_agentd
47 if [ ! -f /var/lock/subsys/zabbix_agentd ]; then
48 msg_not_running "Zabbix Agent"
53 msg_stopping "Zabbix Agent"
54 killproc --pidfile $pidfile zabbix_agentd -TERM
55 rm -f /var/lock/subsys/zabbix_agentd
59 if [ ! -f /var/lock/subsys/zabbix_agentd ]; then
60 msg_not_running "Zabbix Agent"
70 # See how we were called.
89 status --pidfile $pidfile zabbix_agentd
93 msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"