mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #9226 from Security-Onion-Solutions/bgfix
Remove BG for filecheck
This commit is contained in:
@@ -75,6 +75,8 @@ if __name__ == "__main__":
|
|||||||
event_handler =CreatedEventHandler()
|
event_handler =CreatedEventHandler()
|
||||||
|
|
||||||
observer = Observer()
|
observer = Observer()
|
||||||
|
|
||||||
|
logging.info("Starting filecheck")
|
||||||
observer.schedule(event_handler, extract_path, recursive=True)
|
observer.schedule(event_handler, extract_path, recursive=True)
|
||||||
observer.start()
|
observer.start()
|
||||||
try:
|
try:
|
||||||
@@ -83,3 +85,5 @@ if __name__ == "__main__":
|
|||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
observer.stop()
|
observer.stop()
|
||||||
observer.join()
|
observer.join()
|
||||||
|
|
||||||
|
logging.info("Exiting filecheck")
|
||||||
|
|||||||
@@ -162,11 +162,9 @@ filecheck_script:
|
|||||||
- mode: 755
|
- mode: 755
|
||||||
|
|
||||||
filecheck_run:
|
filecheck_run:
|
||||||
cmd.run:
|
cron.present:
|
||||||
- name: 'python3 /opt/so/conf/strelka/filecheck'
|
- name: 'ps -ef | grep filecheck | grep -v grep || python3 /opt/so/conf/strelka/filecheck >> /opt/so/log/strelka/filecheck_stdout.log 2>&1 &'
|
||||||
- bg: True
|
- user: socore
|
||||||
- runas: socore
|
|
||||||
- unless: ps -ef | grep filecheck | grep -v grep
|
|
||||||
|
|
||||||
filcheck_history_clean:
|
filcheck_history_clean:
|
||||||
cron.present:
|
cron.present:
|
||||||
|
|||||||
Reference in New Issue
Block a user