From: Arran Cudbard-Bell Date: Wed, 24 May 2023 02:15:56 +0000 (-0400) Subject: radhttpcheck: Fix doc link X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25f0c468f73ae4d4b2727f49e2145eb396d84add;p=thirdparty%2Ffreeradius-server.git radhttpcheck: Fix doc link --- diff --git a/scripts/health/radhttpcheck/radhttpcheck.py b/scripts/health/radhttpcheck/radhttpcheck.py index 952d108df27..9d7e0674e6d 100755 --- a/scripts/health/radhttpcheck/radhttpcheck.py +++ b/scripts/health/radhttpcheck/radhttpcheck.py @@ -112,19 +112,19 @@ class RadiusHealthCheckHandler(BaseHTTPRequestHandler): req.add_message_authenticator() # We now block until retries and timeout have expired - rsp = None try: rsp = client.SendPacket(req) except pyrad.packet.PacketError as e: self.genericResponse(502, json.dumps({"msg": "Healthcheck error: " + str(e) })) # BadGateway + return except pyrad.client.Timeout as e: self.genericResponse(504, json.dumps({"msg": "Healthcheck error: No response from upstream"})) # Gateway timeout + return except Exception as e: self.genericResponse(500, json.dumps({"msg": "Internal error: " + str(e) })) # Internal error + return finally: del client # Ensure the socket is closed in a timely fashion - if not rsp: - return # Deal with response code mismatches if healthcheck['require_ack'] and healthcheck['type'].has_key('rsp_code') and rsp.code != healthcheck['type']['rsp_code']: diff --git a/scripts/health/radhttpcheck/radhttpcheck.service b/scripts/health/radhttpcheck/radhttpcheck.service index 90af85873fb..0e33eaf48e0 100644 --- a/scripts/health/radhttpcheck/radhttpcheck.service +++ b/scripts/health/radhttpcheck/radhttpcheck.service @@ -1,7 +1,7 @@ [Unit] Description=radhttpcheck health probe translator After=network-online.target -Documentation=raddhtpcheck/README.md +Documentation=https://github.com/FreeRADIUS/freeradius-server/blob/master/scripts/health/radhttpcheck/README.md [Service] Type=exec