From 53610c3ce7590ab992d5e2f7afb14d948ac1d1da Mon Sep 17 00:00:00 2001 From: Lutz Bender Date: Fri, 19 Dec 2025 08:25:32 +0100 Subject: [PATCH] clean mosquitto conf.d --- runs/atreboot.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/runs/atreboot.sh b/runs/atreboot.sh index 3485ec0c3d..ee287d53f1 100755 --- a/runs/atreboot.sh +++ b/runs/atreboot.sh @@ -351,6 +351,16 @@ chmod 666 "$LOGFILE" sudo cp "${OPENWBBASEDIR}/data/config/mosquitto/openwb.conf" "/etc/mosquitto/conf.d/openwb.conf" restartService=1 fi + echo "checking for unknown mosquitto configuration files..." + # remove files with pattern openwb-*.conf from /etc/mosquitto/conf.d/ + # there may be obsolete files from other versions, eg. with user management features + for file in /etc/mosquitto/conf.d/openwb-*.conf; do + if [[ -f "$file" ]]; then + echo "removing obsolete mosquitto configuration file '$file'" + sudo rm "$file" + restartService=1 + fi + done if versionMatch "${OPENWBBASEDIR}/data/config/mosquitto/mosquitto.acl" "/etc/mosquitto/mosquitto.acl"; then echo "mosquitto acl already up to date" else