diff --git a/check_domain_expiration_rdap.py b/check_domain_expiration_rdap.py index beb1995..631746b 100755 --- a/check_domain_expiration_rdap.py +++ b/check_domain_expiration_rdap.py @@ -255,8 +255,14 @@ def main(): ) domain = pyunycode.convert(args.domain) + # be sure that the provided server url ends with / for future concat + if args.server is not None: + if args.server[-1] != '/': + server = args.server + '/' + else: + server = args.server check = nagiosplugin.Check( - Expiration(domain, args.server), + Expiration(domain, server), nagiosplugin.ScalarContext( 'daystoexpiration', warning=wrange,