fix: workdir may not be available at startup

This commit is contained in:
Glenn Y. Rolland 2024-05-05 19:14:14 +02:00
parent 978904a920
commit 9eb628314e

View file

@ -3,7 +3,15 @@
set -u
set -e
cd /var/www/html
WORKDIR=/var/www/html
counter=0
while [ ! -d "$WORKDIR" ] && [ "$counter" -lt 120 ]; do
echo "GYR:POSTDEPLOY:WAITING"
counter=$((counter+1))
sleep 1
done
cd "$WORKDIR" || exit 1
echo "GYR:POSTDEPLOY:START ($(pwd))"
find . -maxdepth 1
echo "GYR:POSTDEPLOY:UPGRADE"