aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2019-11-05 21:04:35 +1000
committeronefang2019-11-05 21:04:35 +1000
commit48325410c2e8830a826b5571deba87f56d264d7c (patch)
tree1484ac65333dd27c8c4ea54b59251988edc4557d
parentMake DNS report prettier. (diff)
downloadapt-panopticon-48325410c2e8830a826b5571deba87f56d264d7c.zip
apt-panopticon-48325410c2e8830a826b5571deba87f56d264d7c.tar.gz
apt-panopticon-48325410c2e8830a826b5571deba87f56d264d7c.tar.bz2
apt-panopticon-48325410c2e8830a826b5571deba87f56d264d7c.tar.xz
Don't stick a _ at the end of the results file name for the no IP case.
Diffstat (limited to '')
-rwxr-xr-xapt-panopticon.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua
index 788d72c..84a6bed 100755
--- a/apt-panopticon.lua
+++ b/apt-panopticon.lua
@@ -608,7 +608,9 @@ if 0 < #arg then
608 checkHost(pu.host, pu.host, pu.path, arg[2], arg[3]) 608 checkHost(pu.host, pu.host, pu.path, arg[2], arg[3])
609 end 609 end
610 logFile:close() 610 logFile:close()
611 local rfile, e = io.open("results/" .. pu.host .. "_" .. ip .. ".lua", "w+") 611 local f = pu.host
612 if "" ~= ip then f = f .. "_" .. ip end
613 local rfile, e = io.open("results/" .. f .. ".lua", "w+")
612 if nil == rfile then C("opening results file - " .. e) else 614 if nil == rfile then C("opening results file - " .. e) else
613 rfile:write(dumpTable(results, "", "results") .. "\nreturn results\n") 615 rfile:write(dumpTable(results, "", "results") .. "\nreturn results\n")
614 rfile:close() 616 rfile:close()