diff options
Diffstat (limited to 'apt-panopticon.lua')
-rwxr-xr-x | apt-panopticon.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua index b2827b4..ba5c064 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua | |||
@@ -1009,9 +1009,9 @@ else | |||
1009 | local fadt = io.popen("ls -dl results_old 2>/dev/null | cut -d '>' -f 2 | cut -d ' ' -f 2") | 1009 | local fadt = io.popen("ls -dl results_old 2>/dev/null | cut -d '>' -f 2 | cut -d ' ' -f 2") |
1010 | local adt = fadt:read('*l') | 1010 | local adt = fadt:read('*l') |
1011 | fadt:close() | 1011 | fadt:close() |
1012 | if nil ~= adt then os.execute('ionice -c3 nice -n 19 tar -c --xz ' .. adt .. ' -f ' .. adt .. '.tar.xz &') end | 1012 | if (nil ~= adt) and APT.checkFile(adt) then os.execute('ionice -c3 nice -n 19 tar -c --xz ' .. adt .. ' -f ' .. adt .. '.tar.xz &') end |
1013 | local dt = os.date('!%Y-%m-%d-%H-%M') | 1013 | local dt = os.date('!%F-%H-%M') |
1014 | local fodt = io.popen('TZ="GMT" date -r results/stamp +%Y-%m-%d-%H-%M 2>/dev/null', 'r') | 1014 | local fodt = io.popen('TZ="GMT" date -r results/stamp +%F-%H-%M 2>/dev/null', 'r') |
1015 | local odt = fodt:read('*l') | 1015 | local odt = fodt:read('*l') |
1016 | fodt:close() | 1016 | fodt:close() |
1017 | if nil ~= odt then os.execute(' rm -f results_old; ln -s results_' .. odt .. ' results_old 2>/dev/null') end | 1017 | if nil ~= odt then os.execute(' rm -f results_old; ln -s results_' .. odt .. ' results_old 2>/dev/null') end |
@@ -1086,7 +1086,7 @@ os.execute('sleep 1') -- Wait for things to start up before checking for them. | |||
1086 | f = f:sub(9, -1) | 1086 | f = f:sub(9, -1) |
1087 | APT.logFile:write('<hr>\n<hr>\n<h2><a href="' .. f .. '">' .. f .. '</a></h2>\n') | 1087 | APT.logFile:write('<hr>\n<hr>\n<h2><a href="' .. f .. '">' .. f .. '</a></h2>\n') |
1088 | for l in io.lines('results/' .. f) do | 1088 | for l in io.lines('results/' .. f) do |
1089 | if l:match('^' .. os.date('%a %b %d ') .. '.*$') then APT.logFile:write(l .. '\n') end | 1089 | if l:match('^' .. os.date('%Y%-%m%-%d ') .. '.*$') then APT.logFile:write(l .. '\n') end |
1090 | end | 1090 | end |
1091 | end | 1091 | end |
1092 | APT.logPost() | 1092 | APT.logPost() |
@@ -1102,7 +1102,7 @@ os.execute('sleep 1') -- Wait for things to start up before checking for them. | |||
1102 | g = g:sub(9, -1) | 1102 | g = g:sub(9, -1) |
1103 | APT.logFile:write('<hr>\n<hr>\n<h2><a href="' .. g .. '">' .. g .. '</a></h2>\n') | 1103 | APT.logFile:write('<hr>\n<hr>\n<h2><a href="' .. g .. '">' .. g .. '</a></h2>\n') |
1104 | for l in io.lines('results/' .. g) do | 1104 | for l in io.lines('results/' .. g) do |
1105 | if l:match('^' .. os.date('%a %b %d ') .. '.*$') then APT.logFile:write(l .. '\n') end | 1105 | if l:match('^' .. os.date('%Y%-%m%-%d ') .. '.*$') then APT.logFile:write(l .. '\n') end |
1106 | end | 1106 | end |
1107 | end | 1107 | end |
1108 | APT.logPost() | 1108 | APT.logPost() |
@@ -1116,7 +1116,7 @@ os.execute('sleep 1') -- Wait for things to start up before checking for them. | |||
1116 | f = f:sub(9, -1) | 1116 | f = f:sub(9, -1) |
1117 | APT.logFile:write('<hr>\n<hr>\n<h2><a href="' .. f .. '">' .. f .. '</a></h2>\n') | 1117 | APT.logFile:write('<hr>\n<hr>\n<h2><a href="' .. f .. '">' .. f .. '</a></h2>\n') |
1118 | for l in io.lines('results/' .. f) do | 1118 | for l in io.lines('results/' .. f) do |
1119 | if l:match('^' .. os.date('%a %b %d ') .. '.*$') then APT.logFile:write(l .. '\n') end | 1119 | if l:match('^' .. os.date('%Y%-%m%-%d ') .. '.*$') then APT.logFile:write(l .. '\n') end |
1120 | end | 1120 | end |
1121 | end | 1121 | end |
1122 | APT.logPost() | 1122 | APT.logPost() |