added Check if zip is available

This commit is contained in:
Pakobbix 2023-03-02 13:59:49 +01:00
parent 3902dac546
commit 0554803ef3

View File

@ -4,8 +4,16 @@
wireguardzip="https://gitea.zephyre.one/Pakobbix/quick_wireguardtest/raw/branch/main/Wireguard.app.zip"
curl -s $wireguardzip -O "Wireguard.app.zip"
if [ -f Wireguard.app.zip ]; then
echo "Zip bereits vorhanden, überspringe download"
else
if curl -s $wireguardzip -O "Wireguard.app.zip"; then
echo "Download beendet"
else
echo "Download hatte nicht funktioniert, bitte manuell herunterladen:"
echo "$wireguardzip"
fi
fi
unzip WireGuard.app.zip -d /Applications/
sudo chown -R root:wheel /Applications/WireGuard.app