It's useful to have some log output about dynamic DNS updates when
you're trying to debug why they fail.

In my case re-running the script manually with verbosity enabled was not
sufficient (because it succeeded).  A previous update happened on time,
according to the timestamp in /var, and I was sad not to be able to see
the actual output from the failed update request.

Signed-off-by: Marius Gedminas <[email protected]>

Index: net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh
===================================================================
--- net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh  (revision 27134)
+++ net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh  (working copy)
@@ -268,6 +268,7 @@ do
        if [ "$current_ip" != "$registered_ip" ]  || [ $force_interval_seconds 
-lt $time_since_update ]
        then
                verbose_echo "update necessary, performing update ..."
+               logger -t dynamic_dns_updater.sh "$service_id update necessary: 
current IP = $current_ip, registered IP = $registered_ip"
 
                #do replacement
                final_url=$update_url
@@ -294,6 +295,8 @@ do
                verbose_echo "$update_output"
                verbose_echo ""
 
+               logger -t dynamic_dns_updater.sh "$service_id update output: 
$update_output"
+
                #save the time of the update
                current_time=$(monotonic_time)
                last_update=$current_time


Marius Gedminas
-- 
In order to get a loan you must first prove you don't need it.
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to