Skip to content

Commit

Permalink
Double quotes and spaces, my enemy
Browse files Browse the repository at this point in the history
  • Loading branch information
willjohnsonk committed Nov 13, 2023
1 parent 2b9c1b6 commit a97e5ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions engineering_tools/carma
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ carma__swarm() {
if [ "$1" = "deploy" ]; then

echo "Checking Docker Swarm status..."
if [ "$(docker info | grep Swarm | sed 's/Swarm: //g')" == "inactive" ]; then
if [ "$(docker info | grep Swarm | sed 's/Swarm: //g')" == " inactive" ]; then
echo "Initalizing Docker Swarm..."
docker swarm init --advertise-addr 192.168.88.100
else
Expand Down Expand Up @@ -385,7 +385,7 @@ carma__swarm() {
echo "Deploying CARMA to dual compute Swarm stack..."

local TKN=$(docker swarm join-token -q worker)
ssh [email protected] 'docker swarm join --token $TKN 192.168.88.100:2377'
ssh [email protected] "docker swarm join --token $TKN 192.168.88.100:2377"

docker run --rm -v carma-config-data:/opt/carma/vehicle/config --entrypoint sh busybox:latest -c \
'cat /opt/carma/vehicle/config/docker-compose-pc1.yml' | \
Expand All @@ -411,6 +411,7 @@ carma__swarm() {
docker run --rm --name carma-config-data -v carma-config-data:/opt/carma/vehicle/config -d usdotfhwastoldev/carma-config:$2
else
echo "Could not find $2 in local images"
fi

elif [ "$1" = "down" ]; then
echo "Shutting down swarm..."
Expand Down

0 comments on commit a97e5ce

Please sign in to comment.