gitreef

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit e33bf35432c0907d579a66dab68e225d31d20d6b
parent 6247dc36229f5ce8b8b5ab68318b725177038d15
Author: Matthias Jaros <jaros@mailbox.org>
Date:   Sun,  9 Nov 2025 19:41:31 +0100

Only create user if it does not exist

Diffstat:
Msrc/init | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/init b/src/init @@ -35,7 +35,7 @@ function setupUser end # setup user exist if necessary - if checkUser "$user" + if not checkUser "$user" # user is not restricted, this is done in ssh config with forceCommand # we need to be able to run a fish script to check for permissions adduser --home $HOME -D "$user"; or fail "Failed to create user $user" @@ -46,7 +46,7 @@ function setupUser end # Copy/Overwrite ssh key - mkdir -p "$HOME/.ssh" + mkdir "$HOME/.ssh" echo "$key" > "$HOME/.ssh/authorized_keys" chown -R $user "$HOME" chmod -R 700 "$HOME"