-
-
Save adam-zethraeus/9210b4e5970dcbbf450e57c6766529ee to your computer and use it in GitHub Desktop.
A cli for launching/stopping Global Protect (and stopping it from auto-launching on restart)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function setup() { | |
sudo mv /Library/LaunchDaemons/com.paloaltonetworks.gp.pangpsd.plist /Library/Application\ Support/PaloAltoNetworks/GlobalProtect/ | |
sudo mv /Library/LaunchAgents/com.paloaltonetworks.gp.pangps.plist /Library/Application\ Support/PaloAltoNetworks/GlobalProtect/ | |
sudo mv /Library/LaunchAgents/com.paloaltonetworks.gp.pangpa.plist /Library/Application\ Support/PaloAltoNetworks/GlobalProtect/ | |
} | |
function up() { | |
launchctl load /Library/Application\ Support/PaloAltoNetworks/GlobalProtect/com.paloaltonetworks.gp.pangps.plist | |
launchctl load /Library/Application\ Support/PaloAltoNetworks/GlobalProtect/com.paloaltonetworks.gp.pangpa.plist | |
} | |
function down() { | |
launchctl remove com.paloaltonetworks.gp.pangps | |
launchctl remove com.paloaltonetworks.gp.pangpa | |
} | |
case $1 in | |
up) | |
echo "Launching global protect" | |
up | |
;; | |
down) | |
echo "Quitting global protect" | |
down | |
;; | |
setup) | |
echo "Disabling global protect from startup items" | |
setup | |
;; | |
*) | |
echo "'$1' is not a valid verb. The only valid verbs are 'up' and 'down'." | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment