-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
executable file
·22 lines (20 loc) · 692 Bytes
/
entrypoint.sh
File metadata and controls
executable file
·22 lines (20 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
set -e
# Execute any potential shell scripts in the entrypoint.d/ folder.
find "/entrypoint.d/" -follow -type f -print | sort -V | while read -r f; do
case "${f}" in
*.sh)
if [ -x "${f}" ]; then
echo "Launching ${f}";
"${f}"
else
echo "Ignoring ${f}, not executable";
fi
;;
*)
echo "Ignoring ${f}";;
esac
done
# Run rsync as a "deamon", but keep it in the foreground with its log sent to
# stdout instead of a file. Any additional CMD arguments are just appended.
exec rsync --daemon --no-detach --log-file=/dev/stdout --config=/etc/rsyncd.conf $@