From cd56eb6db16f01bf9e111d9fce651d323faab19b Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 8 Jul 2014 16:10:46 +0200 Subject: [PATCH] ddns.cgi: Add hook to generate ddns.conf from CLI. --- html/cgi-bin/ddns.cgi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/html/cgi-bin/ddns.cgi b/html/cgi-bin/ddns.cgi index 30e6fcf4d..51deb0313 100644 --- a/html/cgi-bin/ddns.cgi +++ b/html/cgi-bin/ddns.cgi @@ -29,6 +29,12 @@ require '/var/ipfire/general-functions.pl'; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; +# Hook to regenerate the configuration files, if cgi got called from command line. +if ($ENV{"REMOTE_ADDR"} eq "") { + &GenerateDDNSConfigFile(); + exit(0); +} + #workaround to suppress a warning when a variable is used only once my @dummy = ( ${Header::table2colour}, ${Header::colouryellow} ); undef (@dummy); -- 2.39.2