2021-10-07 20:28:34 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-10-08 02:58:07 +00:00
|
|
|
if [ ! -z "${RENDER_GROUP_ID}" ]; then
|
|
|
|
if [ "${RENDER_GROUP_ID}" -ne 0 ]; then
|
|
|
|
groupadd -g "${RENDER_GROUP_ID}" render
|
|
|
|
usermod -aG render odm
|
|
|
|
fi
|
2021-10-07 20:28:34 +00:00
|
|
|
fi
|
|
|
|
|
2021-10-08 02:58:07 +00:00
|
|
|
while IFS='=' read -r name value ; do
|
|
|
|
echo "export ${name}=\"${value}\"" >> /home/odm/env
|
2021-10-08 03:16:36 +00:00
|
|
|
done < <(env | grep -v "HOME")
|
2021-10-08 02:58:07 +00:00
|
|
|
chown odm:odm /home/odm/env
|
|
|
|
|
|
|
|
su - odm -c "source /home/odm/env; cd /var/www; echo $WO_DEFAULT_NODES; /usr/bin/node /var/www/index.js $@"
|