Update install.sh

This commit is contained in:
Stefan Pejcic 2025-05-19 16:42:10 +02:00 committed by GitHub
parent 60c9acb5cc
commit 2604895dc5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -181,7 +181,11 @@ set_version_to_install(){
if [ "$CUSTOM_VERSION" = false ]; then
response=$(curl -4 -s "https://hub.docker.com/v2/repositories/openpanel/openpanel-ui/tags")
PANEL_VERSION=$(echo $response | jq -r '.results[0].name')
if command -v jq &> /dev/null; then
PANEL_VERSION=$(echo $response | jq -r '.results[0].name')
else
PANEL_VERSION=$(echo "$response" | grep -o '"name":"[^"]*"' | head -n 1 | sed 's/"name":"\([^"]*\)"/\1/')
fi
if [[ ! "$PANEL_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
PANEL_VERSION="1.3.0" # fallback if hub.docker.com unreachable to first tag that supports arm
fi