Command line or Keyboard Maestro control of Launch Agents?

My uni has graced me with a new VPN client.
Of course I had the old one all automated up nicely with Keyboard Maestro, my Stream Deck, etc.
Anywho
The only way I can see to unload this thing is to run CleanMyMac X, go into Launch Agents, and disable the two that are currently enabled, or vice-versa.
I’ve found various things online about using launchctl to load/unload, etc. but nothing has worked for me.
e.g. sudo launchctl unload system/com.paloaltonetworks.gp.pangps
No combination of enable or start will enable them when disabled. The load command wants a config file of some sort.

Thanks for any ideas.

Step 1: Where are the files stored and what are their exact names?

Probably either in ~/Library/LaunchAgents/ or /Library/LaunchDaemons or /Library/LaunchAgents

Names should end with .plist.

Thanks.
Away from the computer, but did find those.
Something like com.paloaltonetworks.gp.pangpa.plist and com.paloaltonetworks.gp.pangps.plist

I’ve tried thing like this with or without sudo), to no avail.
Also tried run, stop, enable, disable, kickstart.

Stop PanGPS
launchctl unload /Library/LaunchAgents/com.paloaltonetworks.gp.pangps.plist

Stop GlobalProtect (i.e. PanGPA)
launchctl unload /Library/LaunchAgents/com.paloaltonetworks.gp.pangpa.plist

Start PanGPS
launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangps.plist

Start GlobalProtect (i.e. PanGPA) 
launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangpa.plist

Not command line, but my favorite app for controlling launch agents: LaunchControl: The launchd GUI

+100 for the recommendation to use LaunchControl.

You might need the -w flag after load

For anything in /Library/* you should use sudo

I’m genuninly curious as to what you’re trying to accomplish.

1 Like

Perhaps it’s irrational, but I don’t like VPNs and other software that can monitor my network activity running when I’m not connecting to that particular network.