From 14a15aa0e419124f0ab07edbb8a8392915bee2d2 Mon Sep 17 00:00:00 2001 From: Pakobbix Date: Thu, 2 Mar 2023 14:21:41 +0100 Subject: [PATCH] Added check for already installed wireguard --- wiremac.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/wiremac.sh b/wiremac.sh index 8dc8b3b..9e1c51c 100644 --- a/wiremac.sh +++ b/wiremac.sh @@ -15,11 +15,16 @@ else fi fi -echo "Entpacke Zip in den Programme Ordner" -if unzip WireGuard.app.zip -d /Applications/ >/dev/null; then - echo "Entpacken erfolgreich" +echo "Überprüfe, ob Wireguard bereits vorhanden ist" +if [ -d /Applications/WireGuard.app ]; then + echo "WireGuard bereits installiert" else - echo "Entpacken hat nicht funktioniert" + echo "Entpacke Zip in den Programme Ordner" + if unzip WireGuard.app.zip -d /Applications/ >/dev/null; then + echo "Entpacken erfolgreich" + else + echo "Entpacken hat nicht funktioniert" + fi fi echo "Fixe Berechtigungen"