From 97033b478d7f38c63b15e27c1daf12d3a8b3f4d6 Mon Sep 17 00:00:00 2001 From: MrRaph_ Date: Mon, 17 Jun 2024 19:17:25 +0200 Subject: [PATCH] fix: gp-stop-start --- Utils/{global-protect.sh => gp-stop-start.sh} | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) rename Utils/{global-protect.sh => gp-stop-start.sh} (74%) diff --git a/Utils/global-protect.sh b/Utils/gp-stop-start.sh similarity index 74% rename from Utils/global-protect.sh rename to Utils/gp-stop-start.sh index c9dbbbc..9be4ee1 100755 --- a/Utils/global-protect.sh +++ b/Utils/gp-stop-start.sh @@ -15,24 +15,19 @@ # @raycast.author MrRaph_ # @raycast.authorURL https://git.mrraph.fr +message="Error" -case $1 in +case ${1} in start) - echo "Starting GlobalProtect..." launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangpa.plist launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangps.plist - echo "GP Started !" + message="GP Started !" ;; stop) - echo "Stopping GlobalProtect..." launchctl remove com.paloaltonetworks.gp.pangps launchctl remove com.paloaltonetworks.gp.pangpa - echo "GP Stopped !" - ;; - *) - echo "'$1' is not a valid verb." - echo "Usage: $0 {start|stop}" - exit 2 + message="GP Stopped !" ;; esac -;; \ No newline at end of file + +echo $message \ No newline at end of file