X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=lan-dyn-dns-update;fp=lan-dyn-dns-update;h=88cdf2d7034e721fcf1cee83bbeb21a4aafd57c5;hb=fa5deaee2e0182ddfc7b39eea7ee2acedb259ddf;hp=206fa7a4fac27c1324ab89d227947eb2b9f0b152;hpb=d6314e9fd15104b8b9db1f1c4b5f612a45d98a8a;p=distro-setup diff --git a/lan-dyn-dns-update b/lan-dyn-dns-update index 206fa7a..88cdf2d 100644 --- a/lan-dyn-dns-update +++ b/lan-dyn-dns-update @@ -18,7 +18,7 @@ while read -r ip host; do ssh wrt tar -C /etc -c hosts | tar -x if grep -qFx "$ip $host" hosts; then continue; fi # openvpn udpates its status file every 60 seconds by default - if (( $(stat -c%Y hosts) > $(( $(date +%s) + 60 )) )); then + if (( $(stat -c%Y hosts) > EPOCHSECONDS + 60 )); then sleep 60 if $is_connected; then continue; fi fi