summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/drakguard15
1 files changed, 10 insertions, 5 deletions
diff --git a/bin/drakguard b/bin/drakguard
index 67f179f..707f89f 100755
--- a/bin/drakguard
+++ b/bin/drakguard
@@ -54,7 +54,7 @@ my %dansguardian_langs = (
my $blacklist_url_file = "/etc/dansguardian/lists/blacklists/drakguard/urls";
my $whitelist_url_file = "/etc/dansguardian/lists/whitelists/drakguard/urls";
-my ($enable, $level, $time_control, $allow_time_change);
+my ($enable, $level, $time_control, $time_start_h, $time_start_m, $time_stop_h, $time_stop_m, $allow_time_change);
my $shorewall = network::shorewall::read();
my $proxy_port = 3128;
my $proxy_user = 'squid';
@@ -144,16 +144,16 @@ gtkadd($w->{window},
0, gtknew('HBox', sensitive_ref => \$allow_time_change, spacing => 20, children_tight => [
gtknew('Label', text => N("Start:")),
gtknew('HBox', spacing => 2, children_tight => [
- gtknew('SpinButton', lower => 0, upper => 24, step_increment => 1, value => 18),
+ gtknew('SpinButton', lower => 0, upper => 24, step_increment => 1, value => $time_start_h),
gtknew('Label', text => ':'),
- gtknew('SpinButton', lower => 0, upper => 60, step_increment => 1),
+ gtknew('SpinButton', lower => 0, upper => 60, step_increment => 1, value => $time_start_m),
]),
gtknew('Label'),
gtknew('Label', text => N("End:")),
gtknew('HBox', spacing => 2, children_tight => [
- gtknew('SpinButton', lower => 0, upper => 24, step_increment => 1, value => 21),
+ gtknew('SpinButton', lower => 0, upper => 24, step_increment => 1, value => $time_stop_h),
gtknew('Label', text => ':'),
- gtknew('SpinButton', lower => 0, upper => 60, step_increment => 1),
+ gtknew('SpinButton', lower => 0, upper => 60, step_increment => 1, value => $time_stop_m),
]),
]) ) : ()),
]),
@@ -244,6 +244,11 @@ sub load() {
$level = { reverse %dansguardian_levels }->{$guardian->{naughtynesslimit}};
$level ||= { reverse %dansguardian_levels }->{High};
$enable = services::starts_on_boot('dansguardian');
+
+ $time_start_h //= 18;
+ $time_start_m //= 0;
+ $time_stop_h //= 21;
+ $time_stop_m //= 0;
}
sub save() {