Files
addons/meshmonitor/run.sh
2026-03-22 14:56:30 +01:00

19 lines
614 B
Bash

#!/bin/sh
CONFIG_PATH=/data/options.json
# Extract options from Home Assistant config
export MESHTASTIC_NODE_IP=$(jq --raw-output '.meshtastic_node_ip' $CONFIG_PATH)
export MESHTASTIC_TCP_PORT=$(jq --raw-output '.meshtastic_tcp_port // 4403' $CONFIG_PATH)
export ENABLE_VIRTUAL_NODE=$(jq --raw-output '.enable_virtual_node // false' $CONFIG_PATH)
# Standard MeshMonitor variables
export PORT=3001
export NODE_ENV=production
echo "Starting MeshMonitor connecting to $MESHTASTIC_NODE_IP:$MESHTASTIC_TCP_PORT..."
# The application is located in /app in the official image
cd /app
exec node dist/server/server.js