19 lines
614 B
Bash
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
|