From 1081327e513db284709759ed3b2893889a6390b2 Mon Sep 17 00:00:00 2001 From: onefang Date: Fri, 27 Dec 2019 23:41:48 +1000 Subject: Archive results to a daily folder. --- apt-panopticon.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-panopticon.lua b/apt-panopticon.lua index fee4e28..72627a0 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua @@ -1064,7 +1064,7 @@ else local fadt = io.popen("ls -dl results_old 2>/dev/null | cut -d '>' -f 2 | cut -d ' ' -f 2") local adt = fadt:read('*l') fadt:close() - if (nil ~= adt) and APT.checkFile(adt) then os.execute('ionice -c3 nice -n 19 tar -c --xz ' .. adt .. ' -f ' .. adt .. '.tar.xz &') end + if (nil ~= adt) and APT.checkFile(adt) then os.execute('mkdir -p ' .. adt:sub(1, 18) .. '; ionice -c3 nice -n 19 tar -c --xz ' .. adt .. ' -f ' .. adt:sub(1, 18) .. '/' .. adt .. '.tar.xz &') end local dt = os.date('!%F-%H-%M') local fodt = io.popen('TZ="GMT" date -r results/stamp +%F-%H-%M 2>/dev/null', 'r') local odt = fodt:read('*l') -- cgit v1.1