Skip to content

Commit

Permalink
safe user creation
Browse files Browse the repository at this point in the history
  • Loading branch information
noursaidi committed Oct 31, 2024
1 parent 64144c0 commit 708a8f9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion misc/discoverynode/bin/install_daemon
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ if [[ -n $install ]]; then
mkdir -p $LIB_DIR
mkdir -p $ETC_DIR
mkdir -p $ETC_DIR/certs
useradd -r -s /bin/false $USERNAME

if ! id $USERNAME >/dev/null 2>&1; then
useradd -r -s /bin/false $USERNAME
else
echo "Not creating username because it exists"
fi
fi

if [[ -n $install || -n $upgrade ]]; then
Expand Down

0 comments on commit 708a8f9

Please sign in to comment.