summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-27 12:49:26 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-27 12:49:26 +0000
commit4b694cf3a2e6d6ca30d0d159e927f812e2f589d5 (patch)
treebf739a02a98e46935995c3c78a2e64277ffe511e /bin
parent19a07588369088871f33fc3cf769f1ec9fe534d4 (diff)
downloaddrakguard-4b694cf3a2e6d6ca30d0d159e927f812e2f589d5.tar
drakguard-4b694cf3a2e6d6ca30d0d159e927f812e2f589d5.tar.gz
drakguard-4b694cf3a2e6d6ca30d0d159e927f812e2f589d5.tar.bz2
drakguard-4b694cf3a2e6d6ca30d0d159e927f812e2f589d5.tar.xz
drakguard-4b694cf3a2e6d6ca30d0d159e927f812e2f589d5.zip
do not write conf if disabled
Diffstat (limited to 'bin')
-rwxr-xr-xbin/drakguard12
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) {