various fixes
[distro-setup] / lan-dyn-dns-update
index 206fa7a4fac27c1324ab89d227947eb2b9f0b152..88cdf2d7034e721fcf1cee83bbeb21a4aafd57c5 100644 (file)
@@ -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