updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / zabbix-proxy-mysql / zabbix-proxy
blob2600e7aded5d883fadd86bc8c715b8e6ef434a9f
1 #!/bin/bash
3 # Source function library.
4 . /etc/rc.conf
5 . /etc/rc.d/functions
7 # Check that networking is up.
8 if ck_daemon network; then
9 echo "Cannot run zabbix-server without network - run network first"
10 exit
14 start () {
15 stat_busy "Starting zabbix-proxy"
16 /usr/sbin/zabbix_server &>/dev/null
17 if [ $? -gt 0 ]; then
18 stat_fail
19 else
20 add_daemon zabbix_proxy
21 stat_done
25 stop() {
26 stat_busy "Stopping zabbix-proxy"
27 killall zabbix_proxy
28 if [ $? -gt 0 ]; then
29 stat_fail
30 else
31 rm_daemon zabbix_proxy
32 stat_done
36 # See how we were called.
37 case $1 in
38 start)
39 start
41 stop)
42 stop
44 restart)
45 stop
46 start
49 echo $"Usage: zabbix-proxy {start|stop|restart}"
50 exit 1
51 esac
53 exit $RETVAL