Skip to content

Commit acab374

Browse files
committed
Update mosquitto script to not include ..
1 parent 2310017 commit acab374

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

scripts/mosquitto.sh

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
#!/bin/bash
22

3-
CONTAINER_ID=$(docker container ls | grep eclipse-mosquitto | awk {'print $1'})
4-
COMMAND=$1
5-
HOME=$(dirname $0)
3+
set -ex
4+
5+
CONTAINER_ID="$(docker container ls | grep eclipse-mosquitto | awk {'print $1'})"
6+
COMMAND="$1"
7+
SCRIPTS=$(dirname $0)
8+
ROOT=$(dirname $SCRIPTS)
69

710
usage()
811
{
@@ -19,8 +22,8 @@ run()
1922
-p 8883:8883 \
2023
-p 8080:8080 \
2124
-p 8081:8081 \
22-
-v $(pwd)/$HOME/../mosquitto/config:/mosquitto/config \
23-
-v $(pwd)/$HOME/../mosquitto/certs:/mosquitto/certs \
25+
-v $(pwd)/$ROOT/mosquitto/config:/mosquitto/config \
26+
-v $(pwd)/$ROOT/mosquitto/certs:/mosquitto/certs \
2427
eclipse-mosquitto
2528
else
2629
echo "Mosquitto is already running"

0 commit comments

Comments
 (0)