From f0ac3c82d24f744e858909856426adb97e6aea0b Mon Sep 17 00:00:00 2001 From: LouisLam Date: Sun, 19 Sep 2021 00:51:05 +0800 Subject: [PATCH] add some comments --- extra/entrypoint.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extra/entrypoint.sh b/extra/entrypoint.sh index 6dac6333c..0f1d4e2f7 100644 --- a/extra/entrypoint.sh +++ b/extra/entrypoint.sh @@ -1,10 +1,14 @@ #!/usr/bin/env sh +# set -e Exit the script if an error happens set -e PUID=${PUID=1000} PGID=${PGID=1000} files_ownership () { + # -h Changes the ownership of an encountered symbolic link and not that of the file or directory pointed to by the symbolic link. + # -R Recursively descends the specified directories + # -c Like verbose but report only when a change is made chown -hRc "$PUID":"$PGID" /app/data } @@ -12,4 +16,6 @@ echo "==> Performing startup jobs and maintenance tasks" files_ownership echo "==> Starting application with user $PUID group $PGID" + +# --clear-groups Clear supplementary groups. exec setpriv --reuid "$PUID" --regid "$PGID" --clear-groups "$@"