Added error handeling for init.sh

This commit is contained in:
2022-07-02 22:09:33 +02:00
parent d47e3d8ebe
commit ec7705f5fc
13 changed files with 14 additions and 16 deletions

View File

@@ -5,7 +5,7 @@ CurrentVersion=$(curl -s https://api.github.com/repos/duplicati/duplicati/releas
##Duplicati get older version (Working with only the runtime installed)
#CurrentVersion="v2.0.5.1-2.0.5.1_beta_2020-01-18"
echo $CurrentVersion > /opt/Duplicati-installed
curl -L --retry 7 --retry-delay 5 $(curl -s https://api.github.com/repos/duplicati/duplicati/releases/tags/"$CurrentVersion" | grep browser_download_url | grep .zip |grep -v signatures | sed -e s#^.*https#https# | tr -d \") -o /opt/Setup/duplicati.zip
curl -L --retry 7 --retry-delay 5 $(curl -s https://api.github.com/repos/duplicati/duplicati/releases/tags/"$CurrentVersion" | grep browser_download_url | grep .zip |grep -v signatures | sed -e s#^.*https#https# | tr -d \") -o /opt/Setup/duplicati.zip || exit 1
#Extract duplicati
unzip /opt/Setup/duplicati.zip -d /opt/duplicati