44 lines
1.2 KiB
Bash
44 lines
1.2 KiB
Bash
##Build of a release tag (Provided by installer)
|
|
#RelVer=
|
|
|
|
##Build of a release tag (Manual)
|
|
#RelVer=stable
|
|
##Build of a master branch, but config is vaidated
|
|
#RelVer=latest_Tested
|
|
##Build of a master branch
|
|
#RelVer=latest
|
|
RunKs=1
|
|
|
|
#Getting build build nubers
|
|
InstVer=$(cat/opt/ShellHub/build.ID)
|
|
CurVer=$(wget -q -O- https://git.bprieshof.nl/ci/Releases/ShellHub/$RelVer/build.ID)
|
|
|
|
if (("$CurVer" < "$InstVer")); then
|
|
echo "The installed version is newer!"
|
|
fi
|
|
|
|
if (("$CurVer" <= "$InstVer")); then
|
|
echo "No update avalible, Exiting"
|
|
exit
|
|
fi
|
|
|
|
while true; do
|
|
read -p "Updating from build $InstVer to $CurVer, Do you want to Continue? (y/n)" yn
|
|
case $yn in
|
|
[Yy]* ) break;;
|
|
[Nn]* ) echo "Exiting";exit;;
|
|
* ) echo "Please answer yes or no.";;
|
|
esac
|
|
done
|
|
|
|
echo "###############"
|
|
echo "# WARNING #"
|
|
echo "###############"
|
|
echo "Update tool wil NOT update openresty and mongodb"
|
|
echo "and might not (correctly) update their config files"
|
|
echo "The installation might brake"
|
|
|
|
read -r -s -p $'Press enter to continue...'
|
|
|
|
#Getting update script form git repo
|
|
bash <(curl -Ss "https://git.bprieshof.nl/Tools/ShellHubNative/raw/branch/main/Server/update.sh") |