mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-23 01:12:57 +02:00
Fixed redirector schedules - This fixes bug #0000685
This commit is contained in:
@@ -94,10 +94,6 @@ my @downloadfiles=();
|
||||
|
||||
my @metadata=();
|
||||
|
||||
my $chk_cron_dly = "${General::swroot}/updatexlrator/autocheck/cron.daily";
|
||||
my $chk_cron_wly = "${General::swroot}/updatexlrator/autocheck/cron.weekly";
|
||||
my $chk_cron_mly = "${General::swroot}/updatexlrator/autocheck/cron.monthly";
|
||||
|
||||
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||
&General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
|
||||
@@ -1495,27 +1491,18 @@ END
|
||||
|
||||
sub savesettings
|
||||
{
|
||||
if (-e $chk_cron_dly) { unlink($chk_cron_dly); }
|
||||
if (-e $chk_cron_wly) { unlink($chk_cron_wly); }
|
||||
if (-e $chk_cron_mly) { unlink($chk_cron_mly); }
|
||||
|
||||
if (($xlratorsettings{'ENABLE_AUTOCHECK'} eq 'on') && ($xlratorsettings{'AUTOCHECK_SCHEDULE'} eq 'daily'))
|
||||
{
|
||||
symlink("../bin/checkup",$chk_cron_dly)
|
||||
} else {
|
||||
symlink("/bin/false",$chk_cron_dly)
|
||||
system('/usr/local/bin/updxlratorctrl cron daily >/dev/null 2>&1');
|
||||
}
|
||||
if (($xlratorsettings{'ENABLE_AUTOCHECK'} eq 'on') && ($xlratorsettings{'AUTOCHECK_SCHEDULE'} eq 'weekly'))
|
||||
if (($xlratorsettings{'ENABLE_AUTOCHECK'} eq 'on') && ($xlratorsettings{'AUTOCHECK_SCHEDULE'} eq 'weekly'))
|
||||
{
|
||||
symlink("../bin/checkup",$chk_cron_wly)
|
||||
} else {
|
||||
symlink("/bin/false",$chk_cron_wly)
|
||||
system('/usr/local/bin/updxlratorctrl cron weekly >/dev/null 2>&1');
|
||||
}
|
||||
if (($xlratorsettings{'ENABLE_AUTOCHECK'} eq 'on') && ($xlratorsettings{'AUTOCHECK_SCHEDULE'} eq 'monthly'))
|
||||
if (($xlratorsettings{'ENABLE_AUTOCHECK'} eq 'on') && ($xlratorsettings{'AUTOCHECK_SCHEDULE'} eq 'monthly'))
|
||||
{
|
||||
symlink("../bin/checkup",$chk_cron_mly)
|
||||
} else {
|
||||
symlink("/bin/false",$chk_cron_mly)
|
||||
system('/usr/local/bin/updxlratorctrl cron monthly >/dev/null 2>&1');
|
||||
}
|
||||
|
||||
# don't save those variable to the settings file,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
###############################################################################
|
||||
# #
|
||||
# IPFire.org - A linux based firewall #
|
||||
# Copyright (C) 2010 Michael Tremer & Christian Schmidt #
|
||||
# Copyright (C) 2005-2010 IPFire Team #
|
||||
# #
|
||||
# This program is free software: you can redistribute it and/or modify #
|
||||
# it under the terms of the GNU General Public License as published by #
|
||||
@@ -65,9 +65,6 @@ my $hintcolour = '#FFFFCC';
|
||||
my $sourceurlfile = "${General::swroot}/urlfilter/autoupdate/autoupdate.urls";
|
||||
my $updconffile = "${General::swroot}/urlfilter/autoupdate/autoupdate.conf";
|
||||
my $updflagfile = "${General::swroot}/urlfilter/blacklists/.autoupdate.last";
|
||||
my $upd_cron_dly = "${General::swroot}/urlfilter/autoupdate/cron.daily";
|
||||
my $upd_cron_wly = "${General::swroot}/urlfilter/autoupdate/cron.weekly";
|
||||
my $upd_cron_mly = "${General::swroot}/urlfilter/autoupdate/cron.monthly";
|
||||
|
||||
my $errormessage='';
|
||||
my $updatemessage='';
|
||||
@@ -965,29 +962,20 @@ if ($filtersettings{'ACTION'} eq $Lang::tr{'urlfilter save schedule'})
|
||||
print FILE "CUSTOM_UPDATE_URL=$filtersettings{'CUSTOM_UPDATE_URL'}\n";
|
||||
close FILE;
|
||||
|
||||
if (-e $upd_cron_dly) { unlink($upd_cron_dly); }
|
||||
if (-e $upd_cron_wly) { unlink($upd_cron_wly); }
|
||||
if (-e $upd_cron_mly) { unlink($upd_cron_mly); }
|
||||
|
||||
if (($filtersettings{'ENABLE_AUTOUPDATE'} eq 'on') && ($filtersettings{'UPDATE_SCHEDULE'} eq 'daily'))
|
||||
{
|
||||
symlink("../bin/autoupdate.pl",$upd_cron_dly)
|
||||
} else {
|
||||
symlink("/bin/false",$upd_cron_dly)
|
||||
system('/usr/local/bin/urlfilterctrl cron daily >/dev/null 2>&1');
|
||||
}
|
||||
|
||||
if (($filtersettings{'ENABLE_AUTOUPDATE'} eq 'on') && ($filtersettings{'UPDATE_SCHEDULE'} eq 'weekly'))
|
||||
{
|
||||
symlink("../bin/autoupdate.pl",$upd_cron_wly)
|
||||
} else {
|
||||
symlink("/bin/false",$upd_cron_wly)
|
||||
system('/usr/local/bin/urlfilterctrl cron weekly >/dev/null 2>&1');
|
||||
}
|
||||
|
||||
if (($filtersettings{'ENABLE_AUTOUPDATE'} eq 'on') && ($filtersettings{'UPDATE_SCHEDULE'} eq 'monthly'))
|
||||
{
|
||||
symlink("../bin/autoupdate.pl",$upd_cron_mly)
|
||||
} else {
|
||||
symlink("/bin/false",$upd_cron_mly)
|
||||
system('/usr/local/bin/urlfilterctrl cron monthly >/dev/null 2>&1');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user