]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - config/cfgroot/general-functions.pl
Merge branch 'next' into fifteen
[people/teissler/ipfire-2.x.git] / config / cfgroot / general-functions.pl
index c57de1996e78818c3a0d980f32ebc319806fa1c6..48d68a2cd9acbb497f2a8f53cd298978e3bbc823 100644 (file)
@@ -21,8 +21,8 @@ use Net::SSLeay;
 use Net::IPv4Addr qw(:all);
 $|=1; # line buffering
 
-$General::version = '2.11';
-$General::swroot = '/var/ipfire';
+$General::version = 'VERSION';
+$General::swroot = 'CONFIG_ROOT';
 $General::noipprefix = 'noipg-';
 $General::adminmanualurl = 'http://wiki.ipfire.org';
 
@@ -1137,4 +1137,23 @@ sub write_file_utf8 ($) {
        return; 
 }
 
+my $FIREWALL_RELOAD_INDICATOR = "${General::swroot}/firewall/reread";
+
+sub firewall_config_changed() {
+       open FILE, ">$FIREWALL_RELOAD_INDICATOR" or die "Could not open $FIREWALL_RELOAD_INDICATOR";
+       close FILE;
+}
+
+sub firewall_needs_reload() {
+       if (-e "$FIREWALL_RELOAD_INDICATOR") {
+               return 1;
+       }
+
+       return 0;
+}
+
+sub firewall_reload() {
+       system("/usr/local/bin/firewallctrl");
+}
+
 1;