Add 'init/entrypoint.sh'

This commit is contained in:
Danny Bessems 2020-11-08 19:34:59 +00:00
parent 1c8a09a7ce
commit 97ac35b2f0

10
init/entrypoint.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/sh
set -eox pipefail
if [ ! "$RUN_ONCE" -eq "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