Added ServerUpdateTools

This commit is contained in:
2021-01-18 18:22:14 +01:00
parent 89786ee37b
commit 116f219bb7
4 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
##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")