summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@ifm.com>2022-08-06 09:04:22 +0200
committerMatthias Beyer <matthias.beyer@ifm.com>2022-08-16 16:06:18 +0200
commitf80b2a7a71ffc76619afe8d4e593bc3f776e8b45 (patch)
tree6c37a715666df2dccd7b6a29c85180204ee4e232
parent6f2ea7a168deeca744fd07bc1ca97d63a0df0310 (diff)
Fix: Add missing quotes
This fixes shellcheck SC2086 Signed-off-by: Matthias Beyer <matthias.beyer@ifm.com>
-rwxr-xr-xci/configure_bridge.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/ci/configure_bridge.sh b/ci/configure_bridge.sh
index 4099efd9..82fbb30f 100755
--- a/ci/configure_bridge.sh
+++ b/ci/configure_bridge.sh
@@ -11,19 +11,19 @@ set -e
echo "Configuring Bridge"
-URL=$(echo $C8YURL | cut -c 9- - )
+URL=$(echo "$C8YURL" | cut -c 9- - )
sudo tedge cert remove
-sudo tedge cert create --device-id=$C8YDEVICE
+sudo tedge cert create --device-id="$C8YDEVICE"
sudo tedge cert show
-sudo tedge config set c8y.url $URL
+sudo tedge config set c8y.url "$URL"
sudo tedge config set c8y.root.cert.path /etc/ssl/certs
-sudo tedge config set az.url $IOTHUBNAME.azure-devices.net
+sudo tedge config set az.url "$IOTHUBNAME.azure-devices.net"
sudo tedge config set az.root.cert.path /etc/ssl/certs/Baltimore_CyberTrust_Root.pem
@@ -31,7 +31,7 @@ sudo tedge config list
# Note: This will always upload a new certificate. From time to time
# we should delete the old ones in c8y
-sudo -E tedge cert upload c8y --user $C8YUSERNAME
+sudo -E tedge cert upload c8y --user "$C8YUSERNAME"
cat /etc/mosquitto/mosquitto.conf
@@ -41,7 +41,7 @@ pip3 install c8y-api retry-decorator
# Delete the device (ignore error)
set +e
-python3 ./ci/delete_current_device_c8y.py --tenant $C8YTENANT --user $C8YUSERNAME --device $C8YDEVICE --url $C8YURL
+python3 ./ci/delete_current_device_c8y.py --tenant "$C8YTENANT" --user "$C8YUSERNAME" --device "$C8YDEVICE" --url "$C8YURL"
set -e
# Give Cumolocity time to process the cert deletion
@@ -56,9 +56,9 @@ sleep 2
# Retrieve the Cumulocity device ID
-export C8YDEVICEID=$(python3 ./ci/find_device_id.py --tenant $C8YTENANT --user $C8YUSERNAME --device $C8YDEVICE --url $C8YURL)
+export C8YDEVICEID=$(python3 ./ci/find_device_id.py --tenant "$C8YTENANT" --user "$C8YUSERNAME" --device "$C8YDEVICE" --url "$C8YURL")
-echo "The new device ID is: " $C8YDEVICEID
+echo "The new device ID is: " "$C8YDEVICEID"
deactivate