Jedrzej Nowak 1b28b8f3c4 Change resources structure to match repository one
Change-Id: Ie8d8c092e64890af2f0886303ef3f16752ba5b76
2015-12-18 18:01:20 +01:00

18 lines
366 B
Bash

#!/bin/sh
BASE_PATH={{ target_directory }}
KEY_NAME={{ key_name }}
function generate_ssh_keys {
local dir_path=$BASE_PATH$KEY_NAME/
local key_path=$dir_path$KEY_NAME
mkdir -p $dir_path
if [ ! -f $key_path ]; then
ssh-keygen -b 2048 -t rsa -N '' -f $key_path 2>&1
else
echo 'Key $key_path already exists'
fi
}
generate_ssh_keys