add newline with ssh key

this fixes a recurring issue where i expect the newline to already
be there. i've added new pubkeys for users and it ends up on the
same line, breaking both keys.
This commit is contained in:
Ben Harris 2020-11-25 14:01:31 -05:00
parent 85a8a39a69
commit 333ec9bb10
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ case $1 in
sub_to_list "$1"
printf "adding ssh pubkey\n"
printf %s "$3" | sudo tee "/home/$1/.ssh/authorized_keys"
printf "%s\n" "$3" | sudo tee "/home/$1/.ssh/authorized_keys"
printf "\nannouncing new user on mastodon\n"
/usr/local/bin/toot "welcome new user ~$1!"