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.

init_bootstrap.sh 469B

pirms 8 gadiem
pirms 8 gadiem
pirms 8 gadiem
pirms 8 gadiem
pirms 8 gadiem
pirms 8 gadiem
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 root -e"quit" || 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 2
  15. done
  16. echo "Failed to connect to the MySQL service after $retries retries."
  17. exit 1