Saltstack Official Galera Formula
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

22 rindas
443B

  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