Saltstack Official Galera Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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