# HG changeset patch # User Michel Le Bihan # Date 1521838532 -3600 # Node ID ec7f9c8f2a5fc7962c734bfc1ad2b8ac44331d4c # Parent 37ec4c2f319a56ba077e3223e16d36939d9afc8b mod_checkcerts: Fixed luacheck warnings diff -r 37ec4c2f319a -r ec7f9c8f2a5f mod_checkcerts/mod_checkcerts.lua --- a/mod_checkcerts/mod_checkcerts.lua Thu Mar 22 16:16:07 2018 +0100 +++ b/mod_checkcerts/mod_checkcerts.lua Fri Mar 23 21:55:32 2018 +0100 @@ -1,3 +1,4 @@ +local config = require "core.configmanager"; local ssl = require"ssl"; local datetime_parse = require"util.datetime".parse; local load_cert = ssl.loadcertificate; @@ -45,20 +46,20 @@ ssl_config = config.get("*", "ssl"); end if not ssl_config or not ssl_config.certificate then - log("warn", "Could not find a certificate to check"); + module:log("warn", "Could not find a certificate to check"); return; end local certfile = ssl_config.certificate; local fh, ferr = io.open(certfile); -- Load the file. if not fh then - log("warn", "Could not open certificate %s", ferr); + module:log("warn", "Could not open certificate %s", ferr); return; end local cert, lerr = load_cert(fh:read("*a")); -- And parse fh:close(); if not cert then - log("warn", "Could not parse certificate %s: %s", certfile, lerr or ""); + module:log("warn", "Could not parse certificate %s: %s", certfile, lerr or ""); return; end