Ticket #31032: zabbix_agentd.init
File zabbix_agentd.init, 602 bytes (added by kwcheong@…, 13 years ago) |
---|
Line | |
---|---|
1 | #!/bin/sh |
2 | |
3 | case "$1" in |
4 | start) |
5 | echo -n "Starting zabbix_agentd " |
6 | sudo -u zabbix __PREFIX__/sbin/zabbix/zabbix_agentd -c __PREFIX__/etc/zabbix/zabbix_agentd.conf |
7 | ;; |
8 | |
9 | stop) |
10 | echo -n "Shutting down zabbix_agentd" |
11 | pid=`ps axc|awk "{if (\\$5==\"zabbix_agent\") print \\$1}"` |
12 | /bin/kill $pid |
13 | rm /var/tmp/zabbix_agentd.pid |
14 | ;; |
15 | restart) |
16 | $0 stop |
17 | $0 start |
18 | ;; |
19 | status) |
20 | /bin/ps -ax |/usr/bin/grep zabbix_agentd |
21 | ;; |
22 | *) |
23 | echo "Usage: $0 {start|stop|restart|status}" |
24 | exit 1 |
25 | esac |
26 |