diff options
author | Papoteur <papoteur@mageialinux-online.org> | 2016-06-28 21:52:27 +0200 |
---|---|---|
committer | Papoteur <papoteur@mageialinux-online.org> | 2016-06-28 21:52:27 +0200 |
commit | 2054c78f2010540f30690387db5223fd27233a16 (patch) | |
tree | fc904aa0f9b9905c88b6653706f4b4d07a353f43 | |
parent | 619f984be007ec608c09b062c471f6654711aeb7 (diff) | |
download | drakguard-2054c78f2010540f30690387db5223fd27233a16.tar drakguard-2054c78f2010540f30690387db5223fd27233a16.tar.gz drakguard-2054c78f2010540f30690387db5223fd27233a16.tar.bz2 drakguard-2054c78f2010540f30690387db5223fd27233a16.tar.xz drakguard-2054c78f2010540f30690387db5223fd27233a16.zip |
Adapt the config files to e2guardian
-rwxr-xr-x | bin/drakguard | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/bin/drakguard b/bin/drakguard index d3ed8bd..9bd9347 100755 --- a/bin/drakguard +++ b/bin/drakguard @@ -16,12 +16,12 @@ use network::squid; use services; use Encode; -my $dansguardian_main_file = "/etc/dansguardian/dansguardian.conf"; -my $dansguardian_filter_file = "/etc/dansguardian/dansguardianf1.conf"; +my $dansguardian_main_file = "/etc/e2guardian/e2guardian.conf"; +my $dansguardian_filter_file = "/etc/e2guardian/e2guardianf1.conf"; my $time_control_file = "/etc/shorewall/time_control"; -my $dansguardian_bannedsitelist = "/etc/dansguardian/lists/bannedsitelist"; -my $dansguardian_exceptionsitelist = "/etc/dansguardian/lists/exceptionsitelist"; -my $dansguardian_protected_program_list = "/etc/dansguardian/lists/blacklists/drakguard/protected_list"; +my $dansguardian_bannedsitelist = "/etc/e2guardian/lists/bannedsitelist"; +my $dansguardian_exceptionsitelist = "/etc/e2guardian/lists/exceptionsitelist"; +my $dansguardian_protected_program_list = "/etc/e2guardian/lists/blacklists/drakguard/protected_list"; my $msec_conf = "/etc/security/msec/perms.conf"; my $perms_orig = "/etc/security/msec/perms.orig"; my $fstab_file = "/etc/fstab"; @@ -60,15 +60,15 @@ my %dansguardian_langs = ( ukenglish => 'en', ); -my $blacklist_url_file = "/etc/dansguardian/lists/blacklists/drakguard/urls"; -my $whitelist_url_file = "/etc/dansguardian/lists/whitelists/drakguard/urls"; +my $blacklist_url_file = "/etc/e2guardian/lists/blacklists/drakguard/urls"; +my $whitelist_url_file = "/etc/e2guardian/lists/whitelists/drakguard/urls"; my ($enable, $level, $time_control, $time_start_h, $time_start_m, $time_stop_h, $time_stop_m, $allow_time_change, $net_control, $not_net_control, $program_control, $net_control_state, $program_control_state, $acl_state); my ($acl_active); my $shorewall = network::shorewall::read(); my $proxy_port = 3128; my $proxy_user = 'squid'; my $guardian_port = 8080; -my $guardian_user = 'dansguardian'; +my $guardian_user = 'e2guardian'; my $root_user = 'root'; load(); @@ -450,7 +450,7 @@ sub save() { network::shorewall::set_in_file('start', $enable && $time_control, "INCLUDE $time_control_file"); if ($enable) { - $in->do_pkgs->ensure_are_installed([ qw(shorewall squid dansguardian) ]) + $in->do_pkgs->ensure_are_installed([ qw(shorewall squid e2guardian) ]) or quit_gui(1); $_->{apply}(list_get_entries($_->{list})) foreach @url_lists; @@ -463,7 +463,7 @@ sub save() { $program_control = 0; $url_lists[2]{apply}(list_get_entries($url_lists[2]{list})); } - services::set_status($_, $enable) foreach qw(squid dansguardian); + services::set_status($_, $enable) foreach qw(squid e2guardian); if ($shorewall) { $shorewall->{disabled} = 0 if $enable; @@ -650,7 +650,7 @@ sub read_program_user_list { sub apply_blacklist { my @addr = @_; - my $blacklist_top = "/etc/dansguardian/lists/bannedsitelist"; + my $blacklist_top = "/etc/e2guardian/lists/bannedsitelist"; my $blacklist_category = "blocked by Mageia parental control tool"; output_p($blacklist_url_file, map { $_ . "\n" } qq(#listcategory: "$blacklist_category"), @addr); @@ -659,7 +659,7 @@ sub apply_blacklist { sub apply_whitelist { my @addr = @_; - my $whitelist_top = "/etc/dansguardian/lists/exceptionsitelist"; + my $whitelist_top = "/etc/e2guardian/lists/exceptionsitelist"; output_p($whitelist_url_file, map { $_ . "\n" } @addr); include_guardian_file($whitelist_top, $whitelist_url_file); } |