Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tidy up ec2-create-instance for key re-use #108

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ec2/ec2-create-instance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,10 @@ fi

# were we passed a pem file?
if [ ! -z "$PEM_PATH" ]; then
KEY_NAME=`echo $PEM_PATH | sed 's/\.pem//g'`
KEY_NAME=`basename $PEM_PATH | sed 's/\.pem//g'`
echo "using key_name: $KEY_NAME"
PEM_FILE=$PEM_PATH
echo "pem_file: $PEM_FILE"
elif [ -z "$PEM_PATH" ]; then
RANDOM_STRING="$(uuidgen | cut -c-8)"
KEY_NAME="key-$USER-$RANDOM_STRING"
Expand Down