Quotes
This commit is contained in:
parent
1713d292d1
commit
3518ee9916
|
@ -32,14 +32,14 @@ fi
|
|||
|
||||
if [ "$SSH_PUBLIC_KEY" ]; then
|
||||
if [ ${#SSH_PUBLIC_KEY} -gt 5 ]; then
|
||||
if [ -f $SSH_PUBLIC_KEY ]; then
|
||||
if [ -f "$SSH_PUBLIC_KEY" ]; then
|
||||
mkdir /home/$MY_USERNAME/.ssh
|
||||
cp $SSH_PUBLIC_KEY /home/$MY_USERNAME/.ssh/authorized_keys
|
||||
echo 'ssh public key installed'
|
||||
else
|
||||
if [[ $SSH_PUBLIC_KEY == "ssh-"* ]]; then
|
||||
if [[ "$SSH_PUBLIC_KEY" == "ssh-"* ]]; then
|
||||
mkdir /home/$MY_USERNAME/.ssh
|
||||
echo $SSH_PUBLIC_KEY > /home/$MY_USERNAME/.ssh/authorized_keys
|
||||
echo "$SSH_PUBLIC_KEY" > /home/$MY_USERNAME/.ssh/authorized_keys
|
||||
echo 'ssh public key installed'
|
||||
else
|
||||
echo 'The second parameter does not look like an ssh key'
|
||||
|
|
Loading…
Reference in New Issue