fixed string cmp

This commit is contained in:
2020-06-10 19:08:14 +02:00
parent 32c41e9e91
commit 21ceb2d94a

View File

@ -1,14 +1,14 @@
function ssm_tunnel --description 'access private AWS ressources via Bastion Host' function ssm_tunnel --description 'access private AWS ressources via Bastion Host'
if test (count $argv) -lt 2 if test (count $argv) -lt 2
echo "Provide an Host:Port Mapping & an Local Port" echo "Provide an Host:Port Mapping & an Local Port"
return return
end end
if [ $env != "ops" ] if [ "$env" != "ops" ]
echo "Switch to OPS ENV" echo "Switch to OPS ENV first"
return return
end end
# Get bastion host ID using it's name # Get bastion host ID using it's name
set INSTANCE_ID (aws ec2 describe-instances \ set INSTANCE_ID (aws ec2 describe-instances \
@ -40,4 +40,4 @@ function ssm_tunnel --description 'access private AWS ressources via Bastion Hos
# stop socat on the bastion # stop socat on the bastion
aws ssm cancel-command --command-id $CMD_INVOC_ID aws ssm cancel-command --command-id $CMD_INVOC_ID
echo "Command Cancelled Successfully." echo "Command Cancelled Successfully."
end end