fix: Create missing directory for appuser (needed by marp)

This commit is contained in:
Glenn Y. Rolland 2021-12-21 17:25:50 +01:00
parent 47c507074d
commit d832ca6ad5

View file

@ -13,6 +13,7 @@ EXT_GID=${EXT_GID:-999}
mkdir -p _cache mkdir -p _cache
mkdir -p _build mkdir -p _build
mkdir -p .marp mkdir -p .marp
mkdir -p /home/appuser
# Create user with given ID if needed # Create user with given ID if needed
if ! grep -q "^[^:]*:[^:]*:$EXT_UID:" /etc/group ; then if ! grep -q "^[^:]*:[^:]*:$EXT_UID:" /etc/group ; then
@ -24,11 +25,10 @@ if ! grep -q "^[^:]*:[^:]*:$EXT_UID:" /etc/passwd ; then
useradd -r -u "$EXT_UID" -g appuser appuser useradd -r -u "$EXT_UID" -g appuser appuser
fi fi
if [ -d "_build" ]; then chown -R "$EXT_UID:$EXT_GID" _cache
chown -R "$EXT_UID:$EXT_GID" _cache chown -R "$EXT_UID:$EXT_GID" _build
chown -R "$EXT_UID:$EXT_GID" _build chown -R "$EXT_UID:$EXT_GID" .marp
chown -R "$EXT_UID:$EXT_GID" .marp chown -R "$EXT_UID:$EXT_GID" /home/appuser
fi
if [ "$1" = "shell" ]; then if [ "$1" = "shell" ]; then
exec bash exec bash