This commit is contained in:
yumoqing 2025-10-05 18:20:33 +08:00
parent e9028129b1
commit bab8a51503
2 changed files with 6 additions and 4 deletions

View File

@ -1,8 +1,9 @@
#!/usr/bin/bash
cd
while [ "1" = "1" ]
do
~/py3/bin/ddns --id LTAI5tCAGTfBwtCkLYoqj9S4 --token BdpB1Oz3jUKAXEL0pO0KNT6wLMIfto --ipv4 "kymoz.com" --debug --dns alidns --index4 url:https://www.kaiyuancloud.cn/ip
~/py3/bin/ddns --id LTAI5tCAGTfBwtCkLYoqj9S4 --token BdpB1Oz3jUKAXEL0pO0KNT6wLMIfto --ipv4 "kymoz.com" --debug --dns alidns --index4 url:https://sage.opencomputing.cn/ip
ret=$?
echo $(date +"%Y-%m-%d %H:%M:%S"):ddns -c /etc/ydns.conf : exit $ret > ~/logs/ydns.log
sleep 60

View File

@ -3,9 +3,10 @@ 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"
User=ymq
Group=ymq
ExecStart=/home/ymq/py/ydns/script/run.sh
ExecStop=/home/ymq/py/ydns/script/stop.sh
[Install]
WantedBy=multi-user.target