mac下设置goagent自动启动

看到知乎上的攻略,这里记录一下

1.终端执行下面的命令。

sudo vi /Library/LaunchDaemons/com.go.agent.plist
然后黏贴如下代码,并保存

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"

"http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

<key>Label</key>

<string>com.go.agent</string>

<key>ProgramArguments</key>

<array>

<string>python</string> 

<string>/Applications/Utilities/goagent/local/proxy.py</string>

</array>

<key>RunAtLoad</key>

<true/>

</dict>

</plist>

 

2.然后在执行如下代码,重启,开始用吧。
sudo chown root:wheel /Library/LaunchDaemons/com.go.agent.plist

你可能感兴趣的:(goagent)