about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authoradmins <admins@tilde.institute>2020-07-26 15:07:37 -0400
committeradmins <admins@tilde.institute>2020-07-26 15:07:37 -0400
commit750e8f5b204f03d9030316d9b53d33edf05a5220 (patch)
tree9aa143251b48d7e61313bac5a86c5f8a39557cc3
parent0721da9d3655de05b0fb50cae54b2913c61bc71e (diff)
downloadadmin-750e8f5b204f03d9030316d9b53d33edf05a5220.tar.gz
removed loop so I can just call badprocs.py via cron
-rwxr-xr-xbin/badprocs.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/bin/badprocs.py b/bin/badprocs.py
index a77ec54..d25e6f3 100755
--- a/bin/badprocs.py
+++ b/bin/badprocs.py
@@ -51,10 +51,7 @@ if __name__ == "__main__":
         "xmr",  # lots of monero miners have this in the name
     ]
 
-    while True:
-        procsFound = getBadProcs(procsList)
+    procsFound = getBadProcs(procsList)
 
-        if len(procsFound) > 0:
-            mailAdmins(procsFound)
-
-        time.sleep(300)
+    if len(procsFound) > 0:
+        mailAdmins(procsFound)