diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/drakguard | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/drakguard b/bin/drakguard index 0d437d8..5b886a5 100755 --- a/bin/drakguard +++ b/bin/drakguard @@ -233,11 +233,13 @@ sub save() { enable_transparent_proxy($proxy_port); services::set_status($_, $enable) foreach qw(squid dansguardian); - $shorewall->{disabled} = 0 if $enable; - $shorewall->{accept_local_user}{http} = $enable && $proxy_user; - $shorewall->{accept_local_user}{$proxy_port} = $enable && $guardian_user; - network::shorewall::set_redirected_ports($shorewall, 'tcp', $guardian_port, if_($enable, 'http', $proxy_port)); - network::shorewall::write($shorewall, $in); + if ($shorewall) { + $shorewall->{disabled} = 0 if $enable; + $shorewall->{accept_local_user}{http} = $enable && $proxy_user; + $shorewall->{accept_local_user}{$proxy_port} = $enable && $guardian_user; + network::shorewall::set_redirected_ports($shorewall, 'tcp', $guardian_port, if_($enable, 'http', $proxy_port)); + network::shorewall::write($shorewall, $in); + } quit_gui(); } |