参考:Mac 退出与卸载 GlobalProtect
mac上的Global Protect近似于流氓软件,但迫于学校要求不得不用。于是写了个shell脚本。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
if [ $# -eq 0 ]; then exit 0;fi
case "$1" in
-h|--help)
echo "-l launch";
echo "-k kill";
echo "-as launch and set autostart";
echo "-uas kill and unset autostart";
echo "-h help";
exit 0;;
-k)
launchctl unload /Library/LaunchAgents/com.paloaltonetworks.gp.pangp*;exit 0;;
-l)
launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangp*;exit 0;;
-uas)
launchctl unload -w /Library/LaunchAgents/com.paloaltonetworks.gp.pangp*;exit 0;;
-as)
launchctl load -w /Library/LaunchAgents/com.paloaltonetworks.gp.pangp*;exit 0;;
esac
|
在/usr/local/bin下新建文件,输入以上内容,并赋予执行权限即可。