create .ssh dir if it doesnt exist

This commit is contained in:
Martin Donnelly 2022-02-16 17:05:02 +00:00
parent b374468437
commit 92ac34b90a

View File

@ -48,4 +48,10 @@ sort -u "$WORK_DIR/authorized_keys.tmp" > "$WORK_DIR/authorized_keys.wip"
# cat "$WORK_DIR/authorized_keys.wip"
if [[ ! -d "$HOME/.ssh" ]]; then
mkdir -p "$HOME/.ssh"
fi
cp "$WORK_DIR/authorized_keys.wip" "$HOME/.ssh/authorized_keys"