diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-03-27 12:49:26 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-03-27 12:49:26 +0000 |
commit | 4b694cf3a2e6d6ca30d0d159e927f812e2f589d5 (patch) | |
tree | bf739a02a98e46935995c3c78a2e64277ffe511e | |
parent | 19a07588369088871f33fc3cf769f1ec9fe534d4 (diff) | |
download | drakguard-4b694cf3a2e6d6ca30d0d159e927f812e2f589d5.tar drakguard-4b694cf3a2e6d6ca30d0d159e927f812e2f589d5.tar.gz drakguard-4b694cf3a2e6d6ca30d0d159e927f812e2f589d5.tar.bz2 drakguard-4b694cf3a2e6d6ca30d0d159e927f812e2f589d5.tar.xz drakguard-4b694cf3a2e6d6ca30d0d159e927f812e2f589d5.zip |
do not write conf if disabled
-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) { |