first commit
This commit is contained in:
commit
e9028129b1
19
README.md
Normal file
19
README.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# ydns
|
||||||
|
|
||||||
|
## Dependents
|
||||||
|
ddns
|
||||||
|
```
|
||||||
|
pip install ddns
|
||||||
|
```
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
```
|
||||||
|
cd script
|
||||||
|
sudo cp ydns.service /etc/systemd/system
|
||||||
|
sudo systemctl deamon-reload
|
||||||
|
sudo systemctl enable ydns
|
||||||
|
sudo systemctl start ydns
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
ddns
|
||||||
19
script/config.example.json
Normal file
19
script/config.example.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://ddns.newfuture.cc/schema/v2.8.json",
|
||||||
|
"debug": false,
|
||||||
|
"dns": "dnspod",
|
||||||
|
"id": "YOUR ID or EMAIL for DNS Provider",
|
||||||
|
"index4": "default",
|
||||||
|
"index6": "default",
|
||||||
|
"ipv4": [
|
||||||
|
"newfuture.cc",
|
||||||
|
"ddns.newfuture.cc"
|
||||||
|
],
|
||||||
|
"ipv6": [
|
||||||
|
"newfuture.cc",
|
||||||
|
"ipv6.ddns.newfuture.cc"
|
||||||
|
],
|
||||||
|
"proxy": null,
|
||||||
|
"token": "YOUR TOKEN or KEY for DNS Provider",
|
||||||
|
"ttl": null
|
||||||
|
}
|
||||||
9
script/run.sh
Executable file
9
script/run.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
while [ "1" = "1" ]
|
||||||
|
do
|
||||||
|
~/py3/bin/ddns --id LTAI5tCAGTfBwtCkLYoqj9S4 --token BdpB1Oz3jUKAXEL0pO0KNT6wLMIfto --ipv4 "kymoz.com" --debug --dns alidns --index4 url:https://www.kaiyuancloud.cn/ip
|
||||||
|
ret=$?
|
||||||
|
echo $(date +"%Y-%m-%d %H:%M:%S"):ddns -c /etc/ydns.conf : exit $ret > ~/logs/ydns.log
|
||||||
|
sleep 60
|
||||||
|
done
|
||||||
13
script/ydns.conf
Normal file
13
script/ydns.conf
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://ddns.newfuture.cc/schema/v2.8.json",
|
||||||
|
"debug": true,
|
||||||
|
"dns": "alidns",
|
||||||
|
"id":"LTAI5tCAGTfBwtCkLYoqj9S4",
|
||||||
|
"index4": "default",
|
||||||
|
"index6": "default",
|
||||||
|
"ip4":["kymoz.com"],
|
||||||
|
"ip6":["kymoz.com"],
|
||||||
|
"proxy": null,
|
||||||
|
"token":"BdpB1Oz3jUKAXEL0pO0KNT6wLMIfto",
|
||||||
|
"ttl": null
|
||||||
|
}
|
||||||
11
script/ydns.service
Normal file
11
script/ydns.service
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=dynamic dns service
|
||||||
|
Wants=systemd-networkd.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
ExecStart=su - ymq -c "/home/ymq/py/ydns/script/run.sh &"
|
||||||
|
ExecStop=su - ymq -c "/home/ymq/bin/killname ydns/script/run.sh"
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user