fix: create user if it doesn't exist
This commit is contained in:
parent
63967d4074
commit
902082200d
3 changed files with 11 additions and 5 deletions
1
.github/workflows/coverage.yml
vendored
1
.github/workflows/coverage.yml
vendored
|
@ -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
.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…
Reference in a new issue