Files
raycast-scripts/Utils/gp-stop-start.sh
2024-06-17 19:17:25 +02:00

33 lines
834 B
Bash
Executable File

#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title GP Stop Start
# @raycast.mode silent
# @raycast.packageName MrRaph_
#
# Optional parameters:
# @raycast.icon 🌎
# @raycast.argument1 { "type": "text", "placeholder": "stop/start" }
#
# Documentation:
# @raycast.description This script stops or starts Global Protect VPN
# @raycast.author MrRaph_
# @raycast.authorURL https://git.mrraph.fr
message="Error"
case ${1} in
start)
launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangpa.plist
launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangps.plist
message="GP Started !"
;;
stop)
launchctl remove com.paloaltonetworks.gp.pangps
launchctl remove com.paloaltonetworks.gp.pangpa
message="GP Stopped !"
;;
esac
echo $message