sudo -i
chmod +w /Library/sf/edr/agent/bin/eps_services_check.sh
#if [ $? -ne 0 ] ; then
# rm -rf $SCRIPTPATH/../config/machineid
# $SCRIPTPATH/eps_services_ctrl restart
#fi
eps_services_ctrl stop # 退出edr
eps_services_ctrl start # 启动edr
eps_services_ctrl restart # 重启edr
5、添加快捷命令
先退出root用户,再编辑文件~/.bash_profile,新增一条别名
alias edr='sudo /Library/sf/edr/agent/bin/eps_services_ctrl'
执行 source ~/.bash_profile,别名生效
然后就可以愉快地 使用 edr start|stop|restart 命令啦