From 531423f49a739f9e5cd5cb5628d9a23c2b7a6ad2 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Tue, 6 Dec 2022 13:25:03 -0500 Subject: [PATCH 1/2] Update init.sls --- salt/strelka/init.sls | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/salt/strelka/init.sls b/salt/strelka/init.sls index b372e6f6c..b272e15c6 100644 --- a/salt/strelka/init.sls +++ b/salt/strelka/init.sls @@ -170,6 +170,12 @@ filecheck_script: - group: 939 - mode: 755 +filecheck_restart: + cmd.run: + - name: kill $(ps -ef | grep filecheck | grep -v grep | grep -v tail | awk '{print $2}') + - onchanges: + - file: filecheck_script + filecheck_run: cron.present: - name: 'ps -ef | grep filecheck | grep -v grep || python3 /opt/so/conf/strelka/filecheck >> /opt/so/log/strelka/filecheck_stdout.log 2>&1 &' From f0c3b876a94993802af1eeca9d19c2a9ade2e512 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Tue, 6 Dec 2022 13:35:03 -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 b272e15c6..502cb2bb7 100644 --- a/salt/strelka/init.sls +++ b/salt/strelka/init.sls @@ -172,7 +172,7 @@ filecheck_script: filecheck_restart: cmd.run: - - name: kill $(ps -ef | grep filecheck | grep -v grep | grep -v tail | awk '{print $2}') + - name: pkill -f "python3 /opt/so/conf/strelka/filecheck" - onchanges: - file: filecheck_script