@mgutt
ok, so I installed inotify container and see a temp file being written and the copied over the domain.cfg
[2021-07-08 20:28:57] test: CONFIGURATION:
[2021-07-08 20:28:57] test: WATCH_DIR=/dir1
[2021-07-08 20:28:57] test: SETTLE_DURATION=5
[2021-07-08 20:28:57] test: MAX_WAIT_TIME=300
[2021-07-08 20:28:57] test: MIN_PERIOD=600
[2021-07-08 20:28:57] test: COMMAND=
[2021-07-08 20:28:57] test: USER_ID=0
[2021-07-08 20:28:57] test: GROUP_ID=0
[2021-07-08 20:28:57] test: UMASK=0600
[2021-07-08 20:28:57] test: DEBUG=True
[2021-07-08 20:28:57] test: USE_POLLING=False
[2021-07-08 20:28:57] test: IGNORE_EVENTS_WHILE_COMMAND_IS_RUNNING=True
[2021-07-08 20:28:57] test: Starting monitor for test
[2021-07-08 20:28:57] test: Using native change detection to detect changes
[2021-07-08 20:28:58] test: Waiting for new change
[2021-07-08 20:28:59] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedR3Awnl', wd=4, mask=IN_CREATE, cookie=0, name=b'sedR3Awnl'>
[2021-07-08 20:28:59] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedR3Awnl', wd=4, mask=IN_ATTRIB, cookie=0, name=b'sedR3Awnl'>
[2021-07-08 20:28:59] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedR3Awnl', wd=4, mask=IN_MODIFY, cookie=0, name=b'sedR3Awnl'>
[2021-07-08 20:28:59] test: in-event <InotifyEvent: src_path=b'/dir1/config/sed4t3UOe', wd=4, mask=IN_CREATE, cookie=0, name=b'sed4t3UOe'>
[2021-07-08 20:28:59] test: in-event <InotifyEvent: src_path=b'/dir1/config/sed4t3UOe', wd=4, mask=IN_ATTRIB, cookie=0, name=b'sed4t3UOe'>
[2021-07-08 20:28:59] test: in-event <InotifyEvent: src_path=b'/dir1/config/sed4t3UOe', wd=4, mask=IN_MODIFY, cookie=0, name=b'sed4t3UOe'>
[2021-07-08 20:28:59] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedR3Awnl', wd=4, mask=IN_CREATE, cookie=0, name=b'sedR3Awnl'>
[2021-07-08 20:28:59] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedR3Awnl', wd=4, mask=IN_ATTRIB, cookie=0, name=b'sedR3Awnl'>
[2021-07-08 20:28:59] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedR3Awnl', wd=4, mask=IN_MODIFY, cookie=0, name=b'sedR3Awnl'>
[2021-07-08 20:28:59] test: in-event <InotifyEvent: src_path=b'/dir1/config/sed4t3UOe', wd=4, mask=IN_CREATE, cookie=0, name=b'sed4t3UOe'>
[2021-07-08 20:28:59] test: in-event <InotifyEvent: src_path=b'/dir1/config/sed4t3UOe', wd=4, mask=IN_ATTRIB, cookie=0, name=b'sed4t3UOe'>
[2021-07-08 20:28:59] test: in-event <InotifyEvent: src_path=b'/dir1/config/sed4t3UOe', wd=4, mask=IN_MODIFY, cookie=0, name=b'sed4t3UOe'>
[2021-07-08 20:28:59] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedR3Awnl', wd=4, mask=IN_MOVED_FROM, cookie=400522, name=b'sedR3Awnl'>
[2021-07-08 20:28:59] test: in-event <InotifyEvent: src_path=b'/dir1/config/domain.cfg', wd=4, mask=IN_MOVED_TO, cookie=400522, name=b'domain.cfg'>
[2021-07-08 20:28:59] test: in-event <InotifyEvent: src_path=b'/dir1/config/sed4t3UOe', wd=4, mask=IN_MOVED_FROM, cookie=400523, name=b'sed4t3UOe'>
[2021-07-08 20:28:59] test: in-event <InotifyEvent: src_path=b'/dir1/config/domain.cfg', wd=4, mask=IN_MOVED_TO, cookie=400523, name=b'domain.cfg'>
[2021-07-08 20:28:59] test: Detected change to file /dir1/config/sedR3Awnl
[2021-07-08 20:28:59] test: Waiting for watch directory to stabilize for 5 seconds before triggering command
[2021-07-08 20:29:00] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedo5ctBu', wd=4, mask=IN_CREATE, cookie=0, name=b'sedo5ctBu'>
[2021-07-08 20:29:00] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedo5ctBu', wd=4, mask=IN_ATTRIB, cookie=0, name=b'sedo5ctBu'>
[2021-07-08 20:29:00] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedo5ctBu', wd=4, mask=IN_MODIFY, cookie=0, name=b'sedo5ctBu'>
[2021-07-08 20:29:00] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedo5ctBu', wd=4, mask=IN_MOVED_FROM, cookie=400526, name=b'sedo5ctBu'>
[2021-07-08 20:29:00] test: in-event <InotifyEvent: src_path=b'/dir1/config/domain.cfg', wd=4, mask=IN_MOVED_TO, cookie=400526, name=b'domain.cfg'>
[2021-07-08 20:29:05] test: Watch directory stabilized for 5 seconds. Triggering command.
[2021-07-08 20:29:05] test: Running command with user ID 0, group ID 0, and umask 0600
[2021-07-08 20:29:05] test: vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
[2021-07-08 20:29:05] Found existing user "root" with the proper user ID and group ID. Skipping creation of user and group...
[2021-07-08 20:29:05] Running command as user "root"...
Usage: /sbin/setuser USERNAME COMMAND [args..]
[2021-07-08 20:29:05] test: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[2021-07-08 20:29:05] test: Finished running command. Exit code was 1
[2021-07-08 20:29:05] test: Waiting for new change
[2021-07-08 20:29:19] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedmyN7sP', wd=4, mask=IN_CREATE, cookie=0, name=b'sedmyN7sP'>
[2021-07-08 20:29:19] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedmyN7sP', wd=4, mask=IN_ATTRIB, cookie=0, name=b'sedmyN7sP'>
[2021-07-08 20:29:19] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedmyN7sP', wd=4, mask=IN_MODIFY, cookie=0, name=b'sedmyN7sP'>
[2021-07-08 20:29:19] test: in-event <InotifyEvent: src_path=b'/dir1/config/sed130Gz2', wd=4, mask=IN_CREATE, cookie=0, name=b'sed130Gz2'>
[2021-07-08 20:29:19] test: in-event <InotifyEvent: src_path=b'/dir1/config/sed130Gz2', wd=4, mask=IN_ATTRIB, cookie=0, name=b'sed130Gz2'>
[2021-07-08 20:29:19] test: in-event <InotifyEvent: src_path=b'/dir1/config/sed130Gz2', wd=4, mask=IN_MODIFY, cookie=0, name=b'sed130Gz2'>
[2021-07-08 20:29:19] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedmyN7sP', wd=4, mask=IN_MOVED_FROM, cookie=400575, name=b'sedmyN7sP'>
[2021-07-08 20:29:19] test: in-event <InotifyEvent: src_path=b'/dir1/config/domain.cfg', wd=4, mask=IN_MOVED_TO, cookie=400575, name=b'domain.cfg'>
[2021-07-08 20:29:19] test: in-event <InotifyEvent: src_path=b'/dir1/config/sed130Gz2', wd=4, mask=IN_MOVED_FROM, cookie=400577, name=b'sed130Gz2'>
[2021-07-08 20:29:19] test: in-event <InotifyEvent: src_path=b'/dir1/config/domain.cfg', wd=4, mask=IN_MOVED_TO, cookie=400577, name=b'domain.cfg'>
[2021-07-08 20:29:19] test: Detected change to file /dir1/config/sedmyN7sP
[2021-07-08 20:29:19] test: Waiting for watch directory to stabilize for 5 seconds before triggering command
[2021-07-08 20:29:20] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedR27qE6', wd=4, mask=IN_CREATE, cookie=0, name=b'sedR27qE6'>
[2021-07-08 20:29:20] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedR27qE6', wd=4, mask=IN_ATTRIB, cookie=0, name=b'sedR27qE6'>
[2021-07-08 20:29:20] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedR27qE6', wd=4, mask=IN_MODIFY, cookie=0, name=b'sedR27qE6'>
[2021-07-08 20:29:20] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedR27qE6', wd=4, mask=IN_MOVED_FROM, cookie=400580, name=b'sedR27qE6'>
[2021-07-08 20:29:20] test: in-event <InotifyEvent: src_path=b'/dir1/config/domain.cfg', wd=4, mask=IN_MOVED_TO, cookie=400580, name=b'domain.cfg'>
[2021-07-08 20:29:20] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedR27qE6', wd=4, mask=IN_CREATE, cookie=0, name=b'sedR27qE6'>
[2021-07-08 20:29:20] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedR27qE6', wd=4, mask=IN_ATTRIB, cookie=0, name=b'sedR27qE6'>
[2021-07-08 20:29:20] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedR27qE6', wd=4, mask=IN_MODIFY, cookie=0, name=b'sedR27qE6'>
[2021-07-08 20:29:20] test: in-event <InotifyEvent: src_path=b'/dir1/config/sedR27qE6', wd=4, mask=IN_MOVED_FROM, cookie=400580, name=b'sedR27qE6'>
[2021-07-08 20:29:20] test: in-event <InotifyEvent: src_path=b'/dir1/config/domain.cfg', wd=4, mask=IN_MOVED_TO, cookie=400580, name=b'domain.cfg'>
[2021-07-08 20:29:25] test: Watch directory stabilized for 5 seconds. Triggering command.
[2021-07-08 20:29:25] test: Command triggered, but it's too soon to run the command again. Waiting another 580 seconds