Skip to content
Snippets Groups Projects
Commit 6daef66e authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Fixed ping to work better on linux

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1162 44740490-163a-0410-bde0-09ae8108e29a
parent 77dff311
No related branches found
No related tags found
No related merge requests found
......@@ -31,12 +31,13 @@ foreach ($orgs AS $orgkey => $orgconfig) {
$results[$orgkey]['configMeta'] = checkConfig($orgconfig, array('enable_tls', 'testUser', 'testPassword', 'contactMail', 'contactURL'));
$url = parse_url($orgconfig['hostname']);
// print_r($orgconfig['hostname']);
// print_r($url); exit;
$pingreturn = NULL;
$pingoutput = NULL;
exec('ping -o -t 1 -c 1 ' . escapeshellcmd($url['host']), $pingoutput, $pingreturn);
exec('ping -W 1 -c 1 ' . escapeshellcmd($url['host']), $pingoutput, $pingreturn);
# echo $pingreturn; exit;
if ($pingreturn == '0') {
$results[$orgkey]['ping'] = array(TRUE,join("\r\n", $pingoutput));
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment