diff options
-rwxr-xr-x | apt-panopticon.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 72627a0..e54e553 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -1064,7 +1064,10 @@ else | |||
1064 | local fadt = io.popen("ls -dl results_old 2>/dev/null | cut -d '>' -f 2 | cut -d ' ' -f 2") | 1064 | local fadt = io.popen("ls -dl results_old 2>/dev/null | cut -d '>' -f 2 | cut -d ' ' -f 2") |
1065 | local adt = fadt:read('*l') | 1065 | local adt = fadt:read('*l') |
1066 | fadt:close() | 1066 | fadt:close() |
1067 | 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 | 1067 | if (nil ~= adt) and APT.checkFile(adt) then |
1068 | os.execute('{ mkdir -p ' .. adt:sub(1, 18) .. ' && ionice -c3 nice -n 19' .. | ||
1069 | ' tar -c --xz ' .. adt .. ' -f ' .. adt:sub(1, 18) .. '/' .. adt .. '.tar.xz && rm -fr ' .. adt .. ' 2>/dev/null; } &') | ||
1070 | end | ||
1068 | local dt = os.date('!%F-%H-%M') | 1071 | local dt = os.date('!%F-%H-%M') |
1069 | local fodt = io.popen('TZ="GMT" date -r results/stamp +%F-%H-%M 2>/dev/null', 'r') | 1072 | local fodt = io.popen('TZ="GMT" date -r results/stamp +%F-%H-%M 2>/dev/null', 'r') |
1070 | local odt = fodt:read('*l') | 1073 | local odt = fodt:read('*l') |
@@ -1212,10 +1215,6 @@ os.execute('sleep 1') -- Wait for things to start up before checking for them. | |||
1212 | end | 1215 | end |
1213 | end | 1216 | end |
1214 | 1217 | ||
1215 | os.execute('sleep 1') -- Wait for things to start up before checking for them. | ||
1216 | while 1 <= APT.checkExes('tar -c --xz ' .. adt .. ' -f ' .. adt .. '.tar.xz') do os.execute("sleep 10") end | ||
1217 | if nil ~= adt then os.execute('rm -fr ' .. adt .. ' 2>/dev/null') end | ||
1218 | |||
1219 | I('Total run time was ' .. (os.time() - now) .. ' seconds.') | 1218 | I('Total run time was ' .. (os.time() - now) .. ' seconds.') |
1220 | APT.logPost() | 1219 | APT.logPost() |
1221 | end | 1220 | end |