脚本重启时间太快,不清楚是什么原因。可能是默认的重启时间为0.1秒。
可以添加StartLimitInterval=600
,600表示600秒。
[Unit]
Description=ddns
[Service]
ExecStart=/usr/bin/python3 /usr/ddns/aliddns.py
WorkingDirectory=/usr/ddns/
Restart=always
ReStartSec=600
[Install]
WantedBy=default.target
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)