Merge pull request #20 from baby-gnu/fix/ssh-public-key

Create SSH directory before authorized_keys file
pull/23/head
Javi Fontan 9 years ago
commit 4531030cba

@ -29,10 +29,10 @@ function add_keys {
[ -z "${SSH_PUBLIC_KEY}${EC2_PUBLIC_KEY}" ] && exit 0
[ ! -f $AUTH_FILE ] && touch $AUTH_FILE
mkdir -m0700 -p $AUTH_DIR
[ ! -f $AUTH_FILE ] && touch $AUTH_FILE
if [ -n "$SSH_PUBLIC_KEY" ]; then
echo "$SSH_PUBLIC_KEY" | add_keys
fi

Loading…
Cancel
Save