Commit f7ab4f0f authored by Lang Martin's avatar Lang Martin
Browse files

e2e update shell scripts argument quoting

parent 4b8c9428
Showing with 8 additions and 13 deletions
+8 -13
......@@ -10,6 +10,6 @@ fi
nodes=$(terraform output -json -state=terraform/terraform.tfstate | jq -r '(.clients,.servers).value[]')
for node in $nodes
do
echo Executing: ssh -i terraform/keys/*.pem ubuntu@$node $@
ssh -o StrictHostKeyChecking=accept-new -i terraform/keys/*.pem ubuntu@$node $@
done
\ No newline at end of file
echo Executing: ssh -i terraform/keys/*.pem ubuntu@$node "$@"
ssh -o StrictHostKeyChecking=accept-new -i terraform/keys/*.pem ubuntu@$node "$@"
done
#!/bin/bash
set -e
if [ "$1" == "" ]; then
if [ $# -ne 2 ]; then
echo "./upload.sh <source> <destination>"
exit 1
fi
if [ "$2" == "" ]; then
echo "./upload.sh <source> <destination>"
exit 1
fi
set -e
nodes=$(terraform output -json -state=terraform/terraform.tfstate | jq -r '(.clients,.servers).value[]')
for node in $nodes
do
echo Executing: scp -C -i terraform/keys/*.pem $1 ubuntu@$node:$2
#scp -o StrictHostKeyChecking=accept-new -C -i terraform/keys/*.pem "$1" ubuntu@$node:"$2"
echo Executing: scp -C -i terraform/keys/*.pem "$1" ubuntu@$node:"$2"
# scp -o StrictHostKeyChecking=accept-new -C -i terraform/keys/*.pem "$1" ubuntu@$node:"$2"
scp -o StrictHostKeyChecking=accept-new -C -i terraform/keys/*.pem "$1" ubuntu@$node:/tmp/uploaded
ssh -i terraform/keys/*.pem ubuntu@$node sudo mv /tmp/uploaded "$2"
done
\ No newline at end of file
done
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment