From 52e52e46208b2dddeab8152e2f0e2f1e8eb67ee6 Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 10 Dec 2019 16:56:44 +1000 Subject: Clean up after RRD rescue. --- apt-panopticon-RRD-rescue.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apt-panopticon-RRD-rescue.lua b/apt-panopticon-RRD-rescue.lua index 44fe2e6..461ae39 100755 --- a/apt-panopticon-RRD-rescue.lua +++ b/apt-panopticon-RRD-rescue.lua @@ -10,7 +10,7 @@ local arg, sendArgs = APT.parseArgs({...}) os.execute('rm -fr rrd') -local files = io.popen('ls -1 *.tar.xz') +local files = io.popen('ls -1 results_*.tar.xz') for l in files:lines() do print('tar -xf ' .. l) os.execute('tar -xf ' .. l) @@ -38,3 +38,9 @@ for l in files:lines() do end end end + +local files = io.popen('ls -1 results_*.tar.xz') +for l in files:lines() do + print('rm -rf ' .. l:sub(1, 24)) + os.execute('rm -rf ' .. l:sub(1, 24)) +end -- cgit v1.1