ContainerImage.InotifyRsync/init/entrypoint.sh
Danny Bessems ffdb742111
All checks were successful
continuous-integration/drone/push Build is passing
Update 'init/entrypoint.sh'
2020-11-08 20:07:02 +00:00

10 lines
231 B
Bash

#!/bin/sh
set -eox pipefail
if [ "$RUN_ONCE" = "true" ]; then
rsync -avz $SOURCE_DIR $TARGET_DIR
else
while inotifywait -r -e modify,create,delete,move $SOURCE_DIR; do
rsync -avz $SOURCE_DIR $TARGET_DIR
done
fi