Skip to content

Commit 006b572

Browse files
author
Till Brehm
committed
Fixed: FS#3127 - Firewall not fully disabled when the rule set is removed in ispconfig
1 parent 4887d4e commit 006b572

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/plugins-available/firewall_plugin.inc.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,12 @@ private function bastille_update($event_name, $data) {
257257
}
258258
exec($conf['init_scripts'] . '/' . 'bastille-firewall restart 2>/dev/null');
259259
if(@is_file('/etc/debian_version')) exec('update-rc.d bastille-firewall defaults');
260+
if(@is_file('/sbin/insserv')) exec('insserv -d bastille-firewall');
260261
$app->log('Restarting the firewall', LOGLEVEL_DEBUG);
261262
} else {
262263
exec($conf['init_scripts'] . '/' . 'bastille-firewall stop 2>/dev/null');
263264
if(@is_file('/etc/debian_version')) exec('update-rc.d -f bastille-firewall remove');
265+
if(@is_file('/sbin/insserv')) exec('insserv -r -f bastille-firewall');
264266
$app->log('Stopping the firewall', LOGLEVEL_DEBUG);
265267
}
266268

@@ -272,6 +274,7 @@ private function bastille_delete($event_name, $data) {
272274

273275
exec($conf['init_scripts'] . '/' . 'bastille-firewall stop 2>/dev/null');
274276
if(@is_file('/etc/debian_version')) exec('update-rc.d -f bastille-firewall remove');
277+
if(@is_file('/sbin/insserv')) exec('insserv -r -f bastille-firewall');
275278
$app->log('Stopping the firewall', LOGLEVEL_DEBUG);
276279

277280
}

0 commit comments

Comments
 (0)