fix: workdir may not be available at startup
This commit is contained in:
parent
978904a920
commit
9eb628314e
1 changed files with 9 additions and 1 deletions
|
@ -3,7 +3,15 @@
|
||||||
set -u
|
set -u
|
||||||
set -e
|
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))"
|
echo "GYR:POSTDEPLOY:START ($(pwd))"
|
||||||
find . -maxdepth 1
|
find . -maxdepth 1
|
||||||
echo "GYR:POSTDEPLOY:UPGRADE"
|
echo "GYR:POSTDEPLOY:UPGRADE"
|
||||||
|
|
Loading…
Reference in a new issue