]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
ddns.cgi: Add hook to generate ddns.conf from CLI.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 8 Jul 2014 14:10:46 +0000 (16:10 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 8 Jul 2014 14:10:46 +0000 (16:10 +0200)
html/cgi-bin/ddns.cgi

index 30e6fcf4d0ca4951312f7123f8e325e5343b7f3b..51deb03131988fd424cfe8524706a7b126363a78 100644 (file)
@@ -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);