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 5b886a5..3f47167 100755 --- a/bin/drakguard +++ b/bin/drakguard @@ -225,12 +225,14 @@ sub save() { my $guardian_port = 8080; my $guardian_user = 'dansguardian'; - $enable && $in->do_pkgs->ensure_are_installed([ qw(shorewall squid dansguardian) ]) - or quit_gui(); + if ($enable) { + $in->do_pkgs->ensure_are_installed([ qw(shorewall squid dansguardian) ]) + or quit_gui(); - $_->{apply}(map { $_->[0] } @{$_->{list}{data}}) foreach @url_lists; - write_dansguardian(); - enable_transparent_proxy($proxy_port); + $_->{apply}(map { $_->[0] } @{$_->{list}{data}}) foreach @url_lists; + write_dansguardian(); + enable_transparent_proxy($proxy_port); + } services::set_status($_, $enable) foreach qw(squid dansguardian); if ($shorewall) { |