From 6946c7fa2eab182f52429951dab475eff1fe96bf Mon Sep 17 00:00:00 2001 From: onefang Date: Wed, 26 Jun 2019 14:55:44 +1000 Subject: Log file failure should exit, and another tweak. --- mirror-checker.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mirror-checker.lua b/mirror-checker.lua index eb82a32..142c5e3 100755 --- a/mirror-checker.lua +++ b/mirror-checker.lua @@ -417,8 +417,8 @@ if 0 < #arg then else logFile, e = io.open("results/mirror-checker-lua_" .. pu.host .. ".log", "a+") end - if nil == logFile then C("opening log file - " .. e) end - I("Starting tests for " ..pu.host .. " with these tests - " .. table.concat(options.tests.value, ", ")) + if nil == logFile then C("opening log file - " .. e); return end + I("Starting tests for " ..arg[1] .. " with these tests - " .. table.concat(options.tests.value, ", ")) if nil ~= arg[2] then I(" Using IP " .. arg[2]) end if testing("Integrity") or testing("Updated") then if not keep then execute("rm -fr results/" .. pu.host) end @@ -430,12 +430,12 @@ if 0 < #arg then checkExes("mirror-checker.lua " .. sendArgs) checkExes(downloadLock) end - checkHost(pu.host, pu.path, arg[2]) + checkHost(pu.host, pu.host, pu.path, arg[2]) logFile:close() else if not keep then os.execute("rm -f results/*.log") end logFile, e = io.open("results/mirror-checker-lua.log", "a+") - if nil == logFile then C("opening log file - " .. e) end + if nil == logFile then C("opening log file - " .. e); return end I("Starting tests " .. table.concat(options.tests.value, ", ")) execute("mkdir -p results") local mirrors = getMirrors() -- cgit v1.1