From f83545c556b30f26a3ef2536003998a41562b0d4 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Wed, 30 Nov 2022 11:02:56 -0500 Subject: [PATCH 1/2] Update filecheck --- salt/strelka/filecheck/filecheck | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/salt/strelka/filecheck/filecheck b/salt/strelka/filecheck/filecheck index 35bcc7f79..3926abbe9 100644 --- a/salt/strelka/filecheck/filecheck +++ b/salt/strelka/filecheck/filecheck @@ -6,6 +6,7 @@ # Elastic License 2.0. import os +import shutil import time import hashlib import logging @@ -51,7 +52,7 @@ def process(filename, hizash): head, tail = os.path.split(filename) # Move the file - os.rename(filename, strelkapath + tail) + shutil.move(filename, strelkapath + tail) class CreatedEventHandler(FileSystemEventHandler): def on_created(self, event): @@ -76,4 +77,4 @@ if __name__ == "__main__": observer.stop() observer.join() - logging.info("Exiting filecheck") \ No newline at end of file + logging.info("Exiting filecheck") From f083b3867bc74a50bdafa9ef882127f8439ae802 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Fri, 2 Dec 2022 09:40:35 -0500 Subject: [PATCH 2/2] Update init.sls --- salt/strelka/init.sls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/strelka/init.sls b/salt/strelka/init.sls index 155126f91..7397a5b5e 100644 --- a/salt/strelka/init.sls +++ b/salt/strelka/init.sls @@ -141,7 +141,7 @@ filecheck_run: filcheck_history_clean: cron.present: - - name: '/usr/bin/find /nsm/strelka/history/ -type f -mtime +2 -exec rm {} + > /dev/null 2>&1>' + - name: '/usr/bin/find /nsm/strelka/history/ -type f -mtime +2 -exec rm {} + > /dev/null 2>&1' - minute: '33' # End Filecheck Section