$ go build src/ddns.go
$ sudo mkdir /opt/ddns
$ sudo cp ddns /opt/ddns/
$ sudo cp ddns.init.sh /etc/init.d/ddns
$ cp config.json.default config.json
编辑 config.json
:
{
"targetDomains": ["your_sub_domain1", "your_sub_domain2"],
"dnspodEmail": "your_dnspod_login_name",
"dnspodPasswd": "your_dnspod_login_passwd"
}
然后:
$ sudo cp config.json /opt/ddns/
$ sudo update-rc.d ddns defaults