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

21 行
439B

  1. #!/bin/bash
  2. service {{ service.service }} start
  3. counter=${1:-120}
  4. retries=0
  5. while [ $counter -gt 0 ]
  6. do
  7. if mysql -u {{ service.admin.user }} -p{{ service.admin.password }} -e"quit"; then
  8. echo "Sucessfully connected to the MySQL service ($retries retries)."
  9. exit 0
  10. fi
  11. counter=$(( counter - 1 ))
  12. retries=$(( retries + 1 ))
  13. sleep ${2:-4}
  14. done
  15. echo "Failed to connect to the MySQL service after $retries retries."
  16. exit 1