NewFuture / DDNS

:triangular_flag_on_post: 自动更新域名解析到本机IP(支持dnspod,阿里DNS,CloudFlare,华为云,DNSCOM...)
https://ddns.newfuture.cc/
MIT License
4.23k stars 651 forks source link

[debug]ddsn.timer未按照预期定时更新 #365

Closed Wrandz closed 1 year ago

Wrandz commented 1 year ago

描述问题 (Describe the bug)

我是在CentOS7.9上,解压zip源码运行的,使用./systemd.sh install安装了定时服务,我注意到默认是5分钟自动更新一次 但是我刚才通过journalctl -u ddns.timer查看日志的时候,发现只有一条

-- Logs begin at 三 2022-11-09 17:54:15 CST, end at 六 2022-11-12 10:46:27 CST. --
11月 11 20:22:42 localhost.localdomain systemd[1]: Started NewFuture ddns timer.

这是否意味着定时器未按照预期进行? 还是说这期间ip都没有更新,因此程序并没有实质性提交新的dns解析,也就没有产生新的日志?

版本信息 (version info)

复现步骤 (To Reproduce)

参考上述步骤复现

配置文件 (config file)

{
  "$schema": "https://ddns.newfuture.cc/schema/v2.8.json", 
  "debug": false, 
  "dns": "alidns", 
  "id": "I have this", 
  "index4": "default", 
  "index6": "default", 
  "ipv4": [
  ], 
  "ipv6": [
    "I.have.this"
  ], 
  "proxy": null, 
  "token": "I have this", 
  "ttl": null
}

调试输出 (debug output)

我运行一遍systemctl restart ddns,再通过systemctl status ddns -l显示的状态如下

● ddns.service - NewFuture ddns
   Loaded: loaded (/usr/lib/systemd/system/ddns.service; disabled; vendor preset: disabled)
   Active: inactive (dead) since 六 2022-11-12 11:02:07 CST; 8s ago
  Process: 8247 ExecStart=/usr/bin/env python /usr/share/DDNS/run.py -c /etc/DDNS/config.json (code=exited, status=0/SUCCESS)
 Main PID: 8247 (code=exited, status=0/SUCCESS)

11月 12 11:02:07 localhost.localdomain systemd[1]: Started NewFuture ddns.
11月 12 11:02:07 localhost.localdomain env[8247]: .
NewFuture commented 1 year ago

. 就是ip无变化,不需要更新

Wrandz commented 1 year ago

明白了