fix: create user if it doesn't exist

fix-update-website
Aravinth Manivannan 4 months ago
parent 63967d4074
commit 902082200d
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
  1. 1
      .github/workflows/coverage.yml
  2. 1
      .gitignore
  3. 14
      scripts/entrypoint.sh

@ -40,7 +40,6 @@ jobs:
if: matrix.version == 'stable' && (github.ref == 'refs/heads/master' || github.event_name == 'pull_request')
uses: actions-rs/tarpaulin@v0.1
with:
version: '0.18.2'
args: '-t 1200'
env:
# GIT_HASH is dummy value. I guess build.rs is skipped in tarpaulin

1
.gitignore vendored

@ -1 +1,2 @@
/target
tarpaulin-report.html

@ -2,11 +2,17 @@
USER_ID=${LOCAL_USER_ID}
echo $USER_ID
LIBREPAGES_USER=librepages
echo "Starting with UID : $USER_ID"
export HOME=/home/user
export HOME=/home/$LIBREPAGES_USER
#adduser --disabled-password --shell /bin/bash --home $HOME --uid $USER_ID user
#--uid
sudo useradd --uid $USER_ID -b /home -m -s /bin/bash user
su - user
pages
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'

Loading…
Cancel
Save