summaryrefslogtreecommitdiffstats
path: root/core/modules/iptables-helper
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/iptables-helper')
-rwxr-xr-xcore/modules/iptables-helper/data/opt/openslx/iptables/iptables-reloader2
-rwxr-xr-xcore/modules/iptables-helper/data/opt/openslx/iptables/iptables-reloader-worker5
2 files changed, 6 insertions, 1 deletions
diff --git a/core/modules/iptables-helper/data/opt/openslx/iptables/iptables-reloader b/core/modules/iptables-helper/data/opt/openslx/iptables/iptables-reloader
index 60ca1e2c..d29b7725 100755
--- a/core/modules/iptables-helper/data/opt/openslx/iptables/iptables-reloader
+++ b/core/modules/iptables-helper/data/opt/openslx/iptables/iptables-reloader
@@ -1,5 +1,7 @@
#!/bin/ash
+rm -f -- "/run/iptables-reloader.cache" "/run/iptables-reloader.lock"
+
/opt/openslx/iptables/iptables-reloader-worker
exec /opt/openslx/sbin/inotifyd /opt/openslx/iptables/iptables-reloader-worker /opt/openslx/iptables/rules.d:cndmy
diff --git a/core/modules/iptables-helper/data/opt/openslx/iptables/iptables-reloader-worker b/core/modules/iptables-helper/data/opt/openslx/iptables/iptables-reloader-worker
index 43e35eca..4ee3ac8a 100755
--- a/core/modules/iptables-helper/data/opt/openslx/iptables/iptables-reloader-worker
+++ b/core/modules/iptables-helper/data/opt/openslx/iptables/iptables-reloader-worker
@@ -29,7 +29,10 @@ reload_rules () {
done
# No change? Do nothing...
- [ -s "${ALL_RULES}" -a -s "${ALL_RULES}.new" ] && diff "${ALL_RULES}" "${ALL_RULES}.new" && exit 0
+ if [ -s "${ALL_RULES}" ] && [ -s "${ALL_RULES}.new" ] && diff "${ALL_RULES}" "${ALL_RULES}.new"; then
+ rm -f -- "${ALL_RULES}.new"
+ exit 0
+ fi
# Reset
# Filter