From 0de24cd09b4fda887c5cda418a212cfaf77c740a Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Wed, 25 Jan 2012 14:29:28 -0800 Subject: [PATCH] Return more useful error if webserver is down --- status/lang/en | 1 + status/sslcert-monitor.pl | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/status/lang/en b/status/lang/en index c02d68c18..cf5c1172d 100644 --- a/status/lang/en +++ b/status/lang/en @@ -496,6 +496,7 @@ sslcert_file=From file on server sslcert_eurl=Missing, invalid or non-SSL URL sslcert_efile=Missing or invalid certificate file sslcert_ecert=Could not get certificate +sslcert_edown=Web server is down sslcert_days=Days before expiry to fail sslcert_when=When expired sslcert_mismatch=Also detect hostname mismatch? diff --git a/status/sslcert-monitor.pl b/status/sslcert-monitor.pl index 093b44b86..3136b41fd 100755 --- a/status/sslcert-monitor.pl +++ b/status/sslcert-monitor.pl @@ -17,7 +17,8 @@ if ($_[0]->{'url'}) { local $out = &backquote_with_timeout($cmd, 10); if ($?) { # Connection failed - return { 'up' => -1 }; + return { 'up' => -1, + 'desc' => $text{'sslcert_edown'} }; } # Extract the cert part and save