From 56d5bee88e7cfbbded82720c2f9ae0e2dbc3206d Mon Sep 17 00:00:00 2001 From: agessaman Date: Tue, 14 Oct 2025 21:29:30 -0700 Subject: [PATCH] update install.sh to check for MQTT brokers in .env.local --- install.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 7300c57..4e57639 100755 --- a/install.sh +++ b/install.sh @@ -1382,9 +1382,17 @@ main() { else print_info "Keeping existing configuration" # Check if MQTT brokers are already configured - if grep -q "^PACKETCAPTURE_MQTT[1-4]_ENABLED=true" "$INSTALL_DIR/.env.local" 2>/dev/null; then + if [ -f "$INSTALL_DIR/.env.local" ] && grep -q "^PACKETCAPTURE_MQTT[1-4]_ENABLED=true" "$INSTALL_DIR/.env.local" 2>/dev/null; then print_info "MQTT brokers already configured - skipping MQTT configuration" else + # Debug: Show what we're checking + if [ -f "$INSTALL_DIR/.env.local" ]; then + print_info "Checking for MQTT brokers in: $INSTALL_DIR/.env.local" + print_info "Found MQTT lines:" + grep "^PACKETCAPTURE_MQTT[1-4]_ENABLED=" "$INSTALL_DIR/.env.local" 2>/dev/null || echo " (none found)" + else + print_info "Configuration file not found: $INSTALL_DIR/.env.local" + fi # Still need to configure MQTT brokers if not already configured configure_mqtt_brokers_only fi