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