#!/usr/bin/env bash set -euo pipefail # shellcheck source=/dev/null source "$(dirname "$0")/common.sh" echo "Checking Mosquitto is running..." if ! check_port 1883 || ! check_port 9001; then echo "Mosquitto port 1883 or 9001 not found running" fi echo "Updating ./.mosquitto/passwd plaintext to use hashed passwords" docker exec mosquitto mosquitto_passwd -U /etc/mosquitto/passwd echo "Update complete please restart Mosquitto service"