You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
790 B
31 lines
790 B
DDNS for aliyun
|
|
***
|
|
## build
|
|
```bash
|
|
cd /root
|
|
rm -rf ddns
|
|
git clone https://git.sre.ink/go/ddns.git
|
|
cd ddns
|
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on GOPROXY="https://goproxy.cn,direct" go mod tidy
|
|
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on GOPROXY="https://goproxy.cn,direct" go build -v -a -o ddns main.go
|
|
rm -rf /usr/bin/ddns
|
|
mv ddns /usr/bin/
|
|
ddns
|
|
```
|
|
## crontab
|
|
```
|
|
*/10 * * * * /usr/bin/ddns
|
|
```
|
|
|
|
## build on arm n1
|
|
```bash
|
|
cd /root
|
|
rm -rf ddns
|
|
git clone https://git.sre.ink/go/ddns.git
|
|
cd ddns
|
|
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GO111MODULE=on GOPROXY="https://goproxy.cn,direct" go mod tidy
|
|
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GO111MODULE=on GOPROXY="https://goproxy.cn,direct" go build -v -a -o ddns main.go
|
|
rm -rf /usr/bin/ddns
|
|
mv ddns /usr/bin/
|
|
ddns
|
|
``` |