From 43375db989f3f32c9800b6c3e4469f7d795af8e5 Mon Sep 17 00:00:00 2001 From: Stefan Pejcic Date: Tue, 3 Dec 2024 12:19:39 +0100 Subject: [PATCH] Update UPDATE.sh --- version/UPDATE.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/version/UPDATE.sh b/version/UPDATE.sh index 82f8ea26..afbce378 100644 --- a/version/UPDATE.sh +++ b/version/UPDATE.sh @@ -1,8 +1,12 @@ #!/bin/bash # Fallback method to update OpenPanel to the latest version directly from GitHub -# STEP 1. get the latest OpenPanel version -version=$(curl -s https://raw.githubusercontent.com/stefanpejcic/OpenPanel/refs/heads/main/version/latest) +# STEP 1. use user-provided version or check latest OpenPanel version +if [[ "$1" == "--version" && -n "$2" ]]; then + version=$2 +else + version=$(curl -s https://raw.githubusercontent.com/stefanpejcic/OpenPanel/refs/heads/main/version/latest) +fi # STEP 2. download update script wget -O /tmp/openpanel-update-$version https://raw.githubusercontent.com/stefanpejcic/OpenPanel/refs/heads/main/version/$version/UPDATE.sh