Skip to content

Commit

Permalink
variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroTochigi committed Jul 25, 2024
1 parent 83b4730 commit fdf58db
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/aws/up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ checkKeyName() {
for key in "${keyPairs[@]}"
do
if [ "$key" == "$keyname" ]; then
echo "Error: Key Pair '$key' matches the specified keyName '$keyName'. Exiting..."
echo "Error: Key Pair '$key' matches the specified key name '$keyname'. Exiting..."
exit 1
fi
done
Expand Down Expand Up @@ -161,14 +161,14 @@ function up {

checkKeyName

keyName=$(importSshKey | getValueByKeyword KeyName )
importedKeyName=$(importSshKey | getValueByKeyword KeyName )

if [ -z $keyName ]
if [ -z $importedKeyName ]
then
exit 1
fi

echo "Success to add ssh key: $keyName"
echo "Success to add ssh key: $importedKeyName"

createSecurityGroups
echo "Add security group"
Expand All @@ -191,5 +191,5 @@ function up {

openSSHTunnel $instanceName $publicIp $portConfigArray

storeConfigIntoTreehousesConfigAsStringfiedJson $instanceName $keyName $instanceId $publicIp $groupName
storeConfigIntoTreehousesConfigAsStringfiedJson $instanceName $importedKeyName $instanceId $publicIp $groupName
}

0 comments on commit fdf58db

Please sign in to comment.