2021-10-29 20:38:56 +05:30
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
USER_ID=${LOCAL_USER_ID}
|
|
|
|
echo $USER_ID
|
2022-08-15 19:26:28 +05:30
|
|
|
LIBREPAGES_USER=librepages
|
2021-10-29 20:38:56 +05:30
|
|
|
|
|
|
|
echo "Starting with UID : $USER_ID"
|
2022-08-15 19:26:28 +05:30
|
|
|
export HOME=/home/$LIBREPAGES_USER
|
2021-10-29 20:38:56 +05:30
|
|
|
#adduser --disabled-password --shell /bin/bash --home $HOME --uid $USER_ID user
|
|
|
|
#--uid
|
2022-08-15 19:26:28 +05:30
|
|
|
|
|
|
|
if id "$1" &>/dev/null; then
|
|
|
|
echo "User $LIBREPAGES_USER exists"
|
|
|
|
else
|
|
|
|
useradd --uid $USER_ID -b /home -m -s /bin/bash $LIBREPAGES_USER
|
|
|
|
fi
|
|
|
|
|
|
|
|
su $LIBREPAGES_USER -c 'pages'
|