1 | #!/bin/sh |
---|
2 | |
---|
3 | case "$1" in |
---|
4 | start) |
---|
5 | echo -n "Starting zabbix_proxy - 60s start delay for SQL server to load during boot" |
---|
6 | sleep 60 |
---|
7 | sudo -u zabbix __PREFIX__/sbin/zabbix/zabbix_proxy -c __PREFIX__/etc/zabbix/zabbix_proxy.conf |
---|
8 | ;; |
---|
9 | |
---|
10 | stop) |
---|
11 | echo -n "Shutting down zabbix_proxy" |
---|
12 | pid=`ps axc|awk "{if (\\$5==\"zabbix_proxy\") print \\$1}"` |
---|
13 | /bin/kill $pid |
---|
14 | rm /var/tmp/zabbix_proxy.pid |
---|
15 | ;; |
---|
16 | restart) |
---|
17 | $0 stop |
---|
18 | $0 start |
---|
19 | ;; |
---|
20 | status) |
---|
21 | /bin/ps -ax |/usr/bin/grep zabbix_proxy |
---|
22 | ;; |
---|
23 | *) |
---|
24 | echo "Usage: $0 {start|stop|restart|status}" |
---|
25 | exit 1 |
---|
26 | esac |
---|
27 | |
---|