Skip to content

Instantly share code, notes, and snippets.

@samm-git
Last active July 2, 2019 07:38
Show Gist options
  • Save samm-git/ccae1bc5bb414df3e0b4d4fc58601018 to your computer and use it in GitHub Desktop.
Save samm-git/ccae1bc5bb414df3e0b4d4fc58601018 to your computer and use it in GitHub Desktop.
#!/bin/sh
case $1 in
start)
launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangpa.plist
launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangps.plist
;;
status)
echo "com.paloaltonetworks.* processes:"
launchctl list | grep com.paloaltonetworks
;;
restart)
launchctl remove com.paloaltonetworks.gp.pangps
launchctl remove com.paloaltonetworks.gp.pangpa
sleep 2
launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangpa.plist
launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangps.plist
;;
stop)
launchctl remove com.paloaltonetworks.gp.pangps
launchctl remove com.paloaltonetworks.gp.pangpa
;;
*)
echo "Syntax is: "$(basename $0)" [command], where command is: start, stop, restart, status"
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment