Zabbix monitoring RPM
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

70 行
1.4KB

  1. #! /bin/sh
  2. #
  3. # chkconfig: - 85 15
  4. # description: zabbix proxy daemon
  5. #
  6. ### BEGIN INIT INFO
  7. # Provides: zabbix
  8. # Required-Start: $local_fs $network
  9. # Required-Stop: $local_fs $network
  10. # Default-Start:
  11. # Default-Stop: 0 1 2 3 4 5 6
  12. # Short-Description: start and stop zabbix proxy
  13. # Description: Zabbix Proxy
  14. ### END INIT INFO
  15. # zabbix details
  16. if [ -x /usr/sbin/zabbix_proxy_mysql ]; then
  17. ZABBIX_PROXY=zabbix_proxy_mysql
  18. elif [ -x /usr/sbin/zabbix_proxy_pgsql ]; then
  19. ZABBIX_PROXY=zabbix_proxy_pgsql
  20. elif [ -x /usr/sbin/zabbix_proxy_sqlite3 ]; then
  21. ZABBIX_PROXY=zabbix_proxy_sqlite3
  22. else
  23. exit 5
  24. fi
  25. CONF=/etc/zabbix/zabbix_proxy.conf
  26. PIDFILE=/var/run/zabbix.pid
  27. # Source function library.
  28. . /etc/rc.d/init.d/functions
  29. [ -e $CONF ] || exit 6
  30. RETVAL=0
  31. case "$1" in
  32. start)
  33. echo -n "Starting Zabbix Proxy: "
  34. daemon $ZABBIX_PROXY -c $CONF
  35. RETVAL=$?
  36. echo
  37. [ $RETVAL -eq 0 ] && touch /var/lock/subsys/zabbix-proxy
  38. ;;
  39. stop)
  40. echo -n "Shutting down Zabbix Proxy: "
  41. killproc $ZABBIX_PROXY
  42. RETVAL=$?
  43. echo
  44. [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/zabbix-proxy
  45. ;;
  46. restart|reload)
  47. $0 stop
  48. $0 start
  49. RETVAL=$?
  50. ;;
  51. status)
  52. status $ZABBIX_PROXY
  53. RETVAL=$?
  54. ;;
  55. *)
  56. echo "Usage: $0 {start|stop|restart|reload|status}"
  57. exit 1
  58. ;;
  59. esac
  60. exit $RETVAL