From: Paul Wise Date: Fri, 6 Mar 2015 00:12:02 +0000 (+0800) Subject: Prevent failures on non-debian.org hosts X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=b6e9f1412edfc29fb680d277ffe4a7eca5a49b80;p=mirror%2Fdsa-nagios.git Prevent failures on non-debian.org hosts --- diff --git a/dsa-nagios-checks/checks/dsa-check-mirrorsync b/dsa-nagios-checks/checks/dsa-check-mirrorsync index b869116..f3bf783 100755 --- a/dsa-nagios-checks/checks/dsa-check-mirrorsync +++ b/dsa-nagios-checks/checks/dsa-check-mirrorsync @@ -53,7 +53,8 @@ sub usage($$) { }; # Work around LWP not being able to verify service certs directly -$ENV{'HTTPS_CA_DIR'} = '/etc/ssl/ca-debian'; +my $ca_dir = '/etc/ssl/ca-debian'; +$ENV{'HTTPS_CA_DIR'} = $ca_dir if -d $ca_dir; $ENV{'PATH'} = '/bin:/sbin:/usr/bin:/usr/sbin'; delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};