aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2019-11-12 02:37:11 +1000
committeronefang2019-11-12 02:37:11 +1000
commitc5025375de2d902bb613c78033c604105b7dc612 (patch)
treeefd6b591a018d9aa469c0b8571754f824dd03c95
parentOops, wrong quote mark. (diff)
downloadapt-panopticon-c5025375de2d902bb613c78033c604105b7dc612.zip
apt-panopticon-c5025375de2d902bb613c78033c604105b7dc612.tar.gz
apt-panopticon-c5025375de2d902bb613c78033c604105b7dc612.tar.bz2
apt-panopticon-c5025375de2d902bb613c78033c604105b7dc612.tar.xz
Move the execute function to near the checkExes function.
Diffstat (limited to '')
-rwxr-xr-xapt-panopticon.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/apt-panopticon.lua b/apt-panopticon.lua
index 40c308d..227bec1 100755
--- a/apt-panopticon.lua
+++ b/apt-panopticon.lua
@@ -201,6 +201,11 @@ local testing = function(t, host)
201 return false 201 return false
202end 202end
203 203
204local execute = function (s)
205 D(" executing " .. s)
206 return os.execute(s)
207end
208
204local checkExes = function (exe) 209local checkExes = function (exe)
205 local count = io.popen('ps x | grep "' .. exe .. '" | grep -v " grep " | wc -l'):read("*l") 210 local count = io.popen('ps x | grep "' .. exe .. '" | grep -v " grep " | wc -l'):read("*l")
206 D(count .. " " .. exe .. " commands still running.") 211 D(count .. " " .. exe .. " commands still running.")
@@ -369,11 +374,6 @@ local checkFiles = function (host, ip, path, file)
369 end 374 end
370end 375end
371 376
372local execute = function (s)
373 D(" executing " .. s)
374 os.execute(s)
375end
376
377checkHost = function (orig, host, path, ip, file) 377checkHost = function (orig, host, path, ip, file)
378 if nil == host then host = orig end 378 if nil == host then host = orig end
379 if nil == path then path = "" end 379 if nil == path then path = "" end