add wait for nc config.php

This commit is contained in:
ansgarz 2021-12-15 12:45:55 +01:00
parent 53938c0d82
commit 663a460875

View file

@ -35,6 +35,9 @@ function main()
POD=$(kubectl get pod -l app=cloud-app -o name)
kubectl wait $POD --for=condition=Ready --timeout=240s
# wait for nextcloud config file available
timeout 180 bash -c "kubectl exec -t $POD -- bash -c \"until [ -f /var/www/html/config/config.php ]; do sleep 10; done\""
kubectl scale deployment backup-restore --replicas 1
date
@ -54,12 +57,6 @@ function main()
kubectl exec -t $POD -- bash -c "echo \"$ENDPOINT k3stesthost cloudhost\" >> /etc/hosts"
kubectl exec -t $POD -- /usr/local/bin/init.sh
echo ================= DEBUG =================
# tmp
sleep 180
ls -la /var/cloud
date
echo ================= BACKUP =================
kubectl exec -t $POD -- ls -l /var/backups/config
kubectl exec -t $POD -- /usr/local/bin/backup.sh