From f04133177f63231211935933b73cfed6c8ea7fd2 Mon Sep 17 00:00:00 2001 From: Alexei Yuzhakov Date: Mon, 8 Jul 2024 16:35:33 +0100 Subject: [PATCH] TECH Introduce 5 minutes timeout for the Plesk initialization --- wait-for-plesk.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wait-for-plesk.sh b/wait-for-plesk.sh index 5f89d1de..97d6589f 100755 --- a/wait-for-plesk.sh +++ b/wait-for-plesk.sh @@ -1,8 +1,16 @@ #!/bin/bash ### Copyright 1999-2024. WebPros International GmbH. +COUNTER=1 + while : ; do curl -ksL https://plesk:8443/ | grep "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