ForgeFlux/scripts/entrypoint.sh
Aravinth Manivannan 46f450b8d8
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
feat: init
2024-04-26 15:21:57 +05:30

19 lines
410 B
Bash

#!/bin/bash
USER_ID=${LOCAL_USER_ID}
echo $USER_ID
FORGEFLUX_USER=forgeflux
echo "Starting with UID : $USER_ID"
export HOME=/home/$FORGEFLUX_USER
#adduser --disabled-password --shell /bin/bash --home $HOME --uid $USER_ID user
#--uid
if id "$1" &>/dev/null; then
echo "User $FORGEFLUX_USER exists"
else
useradd --uid $USER_ID -b /home -m -s /bin/bash $FORGEFLUX_USER
fi
su $FORGEFLUX_USER -c 'forgeflux'