consul.sh 437 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. set -e
  3. start_consul()
  4. {
  5. if [ "$1" == "server" ]; then
  6. process_start consul agent -server -bootstrap-expect 1 -data-dir /root/consul/data -config-dir /root/consul/config -client 0.0.0.0
  7. elif [ "$1" == "client" ]; then
  8. process_start consul agent -client -config-dir /root/consul/config -join 0.0.0.0
  9. else
  10. process_start consul agent $@
  11. fi
  12. #consul members
  13. }
  14. stop_consul()
  15. {
  16. true
  17. }
  18. monit_consul()
  19. {
  20. true
  21. }