mirror of
https://github.com/morten-olsen/mini-loader.git
synced 2026-02-08 01:36:26 +01:00
14 lines
309 B
Bash
14 lines
309 B
Bash
#!/bin/sh
|
|
|
|
CMD=$@
|
|
UID=${UID:-1001}
|
|
GID=${GID:-1001}
|
|
|
|
addgroup --system --gid ${GID} nodejs && \
|
|
adduser --system --uid ${UID} -G nodejs miniloader && \
|
|
|
|
mkdir -p ${DATA_DIR}
|
|
mkdir -p ${CACHE_DIR}
|
|
chown -R miniloader:nodejs ${DATA_DIR}
|
|
chown -R miniloader:nodejs ${CACHE_DIR}
|
|
su miniloader -s /bin/sh -c "$CMD" |