We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
..
1 parent 2310017 commit acab374Copy full SHA for acab374
scripts/mosquitto.sh
@@ -1,8 +1,11 @@
1
#!/bin/bash
2
3
-CONTAINER_ID=$(docker container ls | grep eclipse-mosquitto | awk {'print $1'})
4
-COMMAND=$1
5
-HOME=$(dirname $0)
+set -ex
+
+CONTAINER_ID="$(docker container ls | grep eclipse-mosquitto | awk {'print $1'})"
6
+COMMAND="$1"
7
+SCRIPTS=$(dirname $0)
8
+ROOT=$(dirname $SCRIPTS)
9
10
usage()
11
{
@@ -19,8 +22,8 @@ run()
19
22
-p 8883:8883 \
20
23
-p 8080:8080 \
21
24
-p 8081:8081 \
- -v $(pwd)/$HOME/../mosquitto/config:/mosquitto/config \
- -v $(pwd)/$HOME/../mosquitto/certs:/mosquitto/certs \
25
+ -v $(pwd)/$ROOT/mosquitto/config:/mosquitto/config \
26
+ -v $(pwd)/$ROOT/mosquitto/certs:/mosquitto/certs \
27
eclipse-mosquitto
28
else
29
echo "Mosquitto is already running"
0 commit comments