From 66f85b7ad03ba0913e99d3e8c74e5144cf28e6e0 Mon Sep 17 00:00:00 2001 From: Stefan Pejcic Date: Tue, 3 Dec 2024 12:16:56 +0100 Subject: [PATCH] Update UPDATE.sh --- version/UPDATE.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/version/UPDATE.sh b/version/UPDATE.sh index c16f2599..82f8ea26 100644 --- a/version/UPDATE.sh +++ b/version/UPDATE.sh @@ -1,13 +1,14 @@ #!/bin/bash -# fallback method to update OpenPanel to latest version directly from GitHub +# Fallback method to update OpenPanel to the latest version directly from GitHub -# get latest openpanel version -version=($curl https://raw.githubusercontent.com/stefanpejcic/OpenPanel/refs/heads/main/version/latest) +# STEP 1. get the latest OpenPanel version +version=$(curl -s https://raw.githubusercontent.com/stefanpejcic/OpenPanel/refs/heads/main/version/latest) -# download update script +# STEP 2. download update script wget -O /tmp/openpanel-update-$version https://raw.githubusercontent.com/stefanpejcic/OpenPanel/refs/heads/main/version/$version/UPDATE.sh - -# run it +# STEP 3. run the update script chmod +x /tmp/openpanel-update-$version && bash /tmp/openpanel-update-$version + +# STEP 4. clean up by removing the update script rm -rf /tmp/openpanel-update-$version