GlobalProtect启动退出脚本(MAC)
3 月 27 日, 2020
mac上的Global Protect近似于流氓软件,但迫于学校要求不得不用。于是写了个shell脚本。
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下新建文件,输入以上内容,并赋予执行权限即可。
更新于 2020-03-27 08:00
Waline