Skip to content

Commit

Permalink
Update mosquitto script to not include ..
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Oct 3, 2023
1 parent 2310017 commit acab374
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions scripts/mosquitto.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#!/bin/bash

CONTAINER_ID=$(docker container ls | grep eclipse-mosquitto | awk {'print $1'})
COMMAND=$1
HOME=$(dirname $0)
set -ex

CONTAINER_ID="$(docker container ls | grep eclipse-mosquitto | awk {'print $1'})"
COMMAND="$1"
SCRIPTS=$(dirname $0)
ROOT=$(dirname $SCRIPTS)

usage()
{
Expand All @@ -19,8 +22,8 @@ run()
-p 8883:8883 \
-p 8080:8080 \
-p 8081:8081 \
-v $(pwd)/$HOME/../mosquitto/config:/mosquitto/config \
-v $(pwd)/$HOME/../mosquitto/certs:/mosquitto/certs \
-v $(pwd)/$ROOT/mosquitto/config:/mosquitto/config \
-v $(pwd)/$ROOT/mosquitto/certs:/mosquitto/certs \
eclipse-mosquitto
else
echo "Mosquitto is already running"
Expand Down

0 comments on commit acab374

Please sign in to comment.