Add more logging for filecheck monitoring, and ensure scripts are accessible to salt-relay

This commit is contained in:
Jason Ertel
2022-11-17 10:43:05 -05:00
parent 0ffef75d7b
commit 7f7e5474ed
2 changed files with 6 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
PIPE_OWNER=${PIPE_OWNER:-socore}
PIPE_GROUP=${PIPE_GROUP:-socore}
SOC_PIPE=${SOC_PIPE_REQUEST:-/opt/so/conf/soc/salt/pipe}
PATH=${PATH}:/usr/sbin
function log() {
echo "$(date) | $1"

View File

@@ -65,6 +65,8 @@ if __name__ == "__main__":
event_handler =CreatedEventHandler()
observer = Observer()
logging.info("Starting filecheck")
observer.schedule(event_handler, extract_path, recursive=True)
observer.start()
try:
@@ -72,4 +74,6 @@ if __name__ == "__main__":
time.sleep(1)
except KeyboardInterrupt:
observer.stop()
observer.join()
observer.join()
logging.info("Exiting filecheck")