Skip to content

Commit

Permalink
TECH Introduce 5 minutes timeout for the Plesk initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
sibprogrammer committed Jul 8, 2024
1 parent abc7c74 commit f041331
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions wait-for-plesk.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
#!/bin/bash
### Copyright 1999-2024. WebPros International GmbH.

COUNTER=1

while : ; do
curl -ksL https://plesk:8443/ | grep "<title>Plesk" > /dev/null
[ $? -eq 0 ] && break
echo "($COUNTER) Waiting for the Plesk initialization..."
sleep 5
COUNTER=$((COUNTER + 1))
if [ $COUNTER -eq 60 ]; then
echo "Too long, interrupting..."
break
fi
done

0 comments on commit f041331

Please sign in to comment.