Wait for all mysql jobs to be finished

This commit is contained in:
Johannes Zellner
2016-08-04 14:06:52 +02:00
parent 6b4675cca1
commit 8702b4320d
+6
View File
@@ -63,6 +63,12 @@ echo "Cleaning up snapshots"
find "${DATA_DIR}/snapshots" -mindepth 1 -maxdepth 1 | xargs --no-run-if-empty btrfs subvolume delete
# restart mysql to make sure it has latest config
# wait for all running mysql jobs
while true; do
if ! systemctl list-jobs | grep mysql; then break; fi
echo "Waiting for mysql jobs..."
sleep 1
done
systemctl restart mysql
readonly mysql_root_password="password"