This commit is contained in:
yumoqing 2024-11-04 15:56:56 +08:00
parent 4dddea7d28
commit cb391948ce
5 changed files with 53 additions and 1 deletions

View File

@ -1,2 +1,19 @@
# ddns
# 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
View File

@ -0,0 +1 @@
ddns

View 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
}

5
script/run.sh Executable file
View File

@ -0,0 +1,5 @@
while [ "1" = "1" ]
do
ddns -c /etc/ydns.conf
sleep 60
done

10
script/ydns.service Normal file
View File

@ -0,0 +1,10 @@
[Unit]
Description=dynamic dns service
Wants=systemd-networkd.service
[Service]
Type=forking
ExecStart=su - ymq -c "/home/ymq/py/ydns/script/run.sh &"
[Install]
WantedBy=multi-user.target