]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/updatexlrator.cgi
Fixed redirector schedules - This fixes bug #0000685
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / updatexlrator.cgi
index 65f6b26bc5d767f54b87c05e999219bd98c23735..04b7b8ee68b7020286b11e346b0bcdab5ee47e32 100644 (file)
@@ -1,5 +1,4 @@
 #!/usr/bin/perl
-#!/usr/bin/perl
 #
 # This code is distributed under the terms of the GPL
 #
@@ -12,7 +11,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2009  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        #
@@ -95,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);
@@ -549,40 +544,40 @@ END
                print "\t\t<td align='center' nowrap='nowrap'>&nbsp;";
                if (&getPID("\\s/usr/bin/wget\\s.*\\s".quotemeta($dlinfo{'SRCURL'})."\$"))
                {
-                       print "<img src='/images/updxl-led-blue.gif' alt='$Lang::tr{'updxlrtr condition download'}' />&nbsp;</td>\n";
+                       print "<img src='/images/updbooster/updxl-led-blue.gif' alt='$Lang::tr{'updxlrtr condition download'}' />&nbsp;</td>\n";
                } else {
-                       print "<img src='/images/updxl-led-gray.gif' alt='$Lang::tr{'updxlrtr condition suspended'}' />&nbsp;</td>\n";
+                       print "<img src='/images/updbooster/updxl-led-gray.gif' alt='$Lang::tr{'updxlrtr condition suspended'}' />&nbsp;</td>\n";
                }
 
                        print "\t\t<td align='center' nowrap='nowrap'>&nbsp;";
                        if ($vendorid =~ /^Adobe$/i)
                        {
-                               print "<img src='/images/updxl-src-adobe.gif' alt='Adobe'}' />&nbsp;</td>\n";
+                               print "<img src='/images/updbooster/updxl-src-adobe.gif' alt='Adobe'}' />&nbsp;</td>\n";
                        } elsif ($vendorid =~ /^Microsoft$/i)
                        {
-                               print "<img src='/images/updxl-src-windows.gif' alt='Microsoft'}' />&nbsp;</td>\n";
+                               print "<img src='/images/updbooster/updxl-src-windows.gif' alt='Microsoft'}' />&nbsp;</td>\n";
                        } elsif ($vendorid =~ /^Symantec$/i)
                        {
-                               print "<img src='/images/updxl-src-symantec.gif' alt='Symantec'}' />&nbsp;</td>\n";
+                               print "<img src='/images/updbooster/updxl-src-symantec.gif' alt='Symantec'}' />&nbsp;</td>\n";
                        } elsif ($vendorid =~ /^Linux$/i)
                        {
-                               print "<img src='/images/updxl-src-linux.gif' alt='Linux'}' />&nbsp;</td>\n";
+                               print "<img src='/images/updbooster/updxl-src-linux.gif' alt='Linux'}' />&nbsp;</td>\n";
                        } elsif ($vendorid =~ /^TrendMicro$/i)
                        {
-                               print "<img src='/images/updxl-src-trendmicro.gif' alt='Trend Micro'}' />&nbsp;</td>\n";
+                               print "<img src='/images/updbooster/updxl-src-trendmicro.gif' alt='Trend Micro'}' />&nbsp;</td>\n";
                        } elsif ($vendorid =~ /^Apple$/i)
                        {
-                               print "<img src='/images/updxl-src-apple.gif' alt='Apple'}' />&nbsp;</td>\n";
+                               print "<img src='/images/updbooster/updxl-src-apple.gif' alt='Apple'}' />&nbsp;</td>\n";
                        } elsif ($vendorid =~ /^Avast$/i)
                        {
-                               print "<img src='/images/updxl-src-avast.gif' alt='Avast'}' />&nbsp;</td>\n";
+                               print "<img src='/images/updbooster/updxl-src-avast.gif' alt='Avast'}' />&nbsp;</td>\n";
                        } else
                        {
-                               if (-e "/home/httpd/html/images/updxl-src-" . $vendorid . ".gif")
+                               if (-e "/home/httpd/html/images/updbooster/updxl-src-" . $vendorid . ".gif")
                                {
-                                       print "<img src='/images/updxl-src-" . $vendorid . ".gif' alt='" . ucfirst $vendorid . "' />&nbsp;</td>\n";
+                                       print "<img src='/images/updbooster/updxl-src-" . $vendorid . ".gif' alt='" . ucfirst $vendorid . "' />&nbsp;</td>\n";
                                } else {
-                                       print "<img src='/images/updxl-src-unknown.gif' alt='" . ucfirst $vendorid . "' />&nbsp;</td>\n";
+                                       print "<img src='/images/updbooster/updxl-src-unknown.gif' alt='" . ucfirst $vendorid . "' />&nbsp;</td>\n";
                                }
                        }
 
@@ -1496,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,