updated on Tue Jan 17 12:00:36 UTC 2012
[aur-mirror.git] / zabbix-server-pgsql / zabbix-server
bloba2f9333b031e335b8d9d56aabb0711dd9f93b622
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-server"
16 /usr/sbin/zabbix_server &>/dev/null
17 if [ $? -gt 0 ]; then
18 stat_fail
19 else
20 add_daemon zabbix_server
21 stat_done
25 stop() {
26 stat_busy "Stopping zabbix-server"
27 killall zabbix_server
28 if [ $? -gt 0 ]; then
29 stat_fail
30 else
31 rm_daemon zabbix_server
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-server {start|stop|restart}"
50 exit 1
51 esac
53 exit $RETVAL