diff --git a/html/cgi-bin/pakfire.cgi b/html/cgi-bin/pakfire.cgi
index 2d6f1c8f9..8f20d5776 100755
--- a/html/cgi-bin/pakfire.cgi
+++ b/html/cgi-bin/pakfire.cgi
@@ -44,6 +44,7 @@ $pakfiresettings{'INSPAKS'} = '';
$pakfiresettings{'DELPAKS'} = '';
$pakfiresettings{'AUTOUPDATE'} = 'off';
$pakfiresettings{'AUTOUPGRADE'} = 'off';
+$pakfiresettings{'HEALTHCHECK'} = 'on';
$pakfiresettings{'UUID'} = 'on';
sub refreshpage{&Header::openbox( 'Waiting', 1, "" );print "

$Lang::tr{'pagerefresh'}";&Header::closebox();}
@@ -169,6 +170,9 @@ $checked{'AUTOUPDATE'}{$pakfiresettings{'AUTOUPDATE'}} = "checked='checked'";
$checked{'AUTOUPGRADE'}{'off'} = '';
$checked{'AUTOUPGRADE'}{'on'} = '';
$checked{'AUTOUPGRADE'}{$pakfiresettings{'AUTOUPGRADE'}} = "checked='checked'";
+$checked{'HEALTHCHECK'}{'off'} = '';
+$checked{'HEALTHCHECK'}{'on'} = '';
+$checked{'HEALTHCHECK'}{$pakfiresettings{'HEALTHCHECK'}} = "checked='checked'";
$checked{'UUID'}{'off'} = '';
$checked{'UUID'}{'on'} = '';
$checked{'UUID'}{$pakfiresettings{'UUID'}} = "checked='checked'";
@@ -292,6 +296,9 @@ print <$Lang::tr{'pakfire core update auto'} |
on |
off |
+ | $Lang::tr{'pakfire health check'} |
+ on |
+ off |
| $Lang::tr{'pakfire register'} |
on |
off |
diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl
index ee5743967..f6226ec08 100644
--- a/langs/de/cgi-bin/de.pl
+++ b/langs/de/cgi-bin/de.pl
@@ -1292,6 +1292,7 @@
'pakfire configuration' => 'Pakfire Konfiguration',
'pakfire core update auto' => 'Core und Addon Updates automatisch installieren:',
'pakfire core update level' => 'Core-Update-Level',
+'pakfire health check' => 'Mirrors auf Erreichbarkeit prüfen(ping)',
'pakfire install description' => 'Wählen Sie ein oder mehrere Pakete zur Installation aus und drücken Sie auf das plus Symbol.',
'pakfire install package' => 'Sie möchten folgende Pakete installieren: ',
'pakfire installed addons' => 'Installierte Addons:',
diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl
index 1fcae040b..590a68fd5 100644
--- a/langs/en/cgi-bin/en.pl
+++ b/langs/en/cgi-bin/en.pl
@@ -1319,6 +1319,7 @@
'pakfire configuration' => 'Pakfire Configuration',
'pakfire core update auto' => 'Install core and addon updates automatically:',
'pakfire core update level' => 'Core-Update-Level',
+'pakfire health check' => 'Check if mirror is reachable(ping)',
'pakfire install description' => 'Please choose one or more items from the list below and click the plus to install.',
'pakfire install package' => 'You want to install the following packages: ',
'pakfire installed addons' => 'Installed Addons:',
diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl
index 0d8e8af37..d2ad7e34a 100644
--- a/src/pakfire/lib/functions.pl
+++ b/src/pakfire/lib/functions.pl
@@ -324,7 +324,11 @@ sub selectmirror {
$proto = $templine[0];
$host = $templine[1];
$path = $templine[2];
- if (pinghost("$host")) {
+ if ($pakfiresettings{'HEALTHCHECK'} eq "off") {
+ logger("PING INFO: Healthcheck is disabled");
+ $found = 1;
+ return ($proto, $host, $path);
+ elsif (pinghost("$host")) {
$found = 1;
return ($proto, $host, $path);
}