<message>Update the _set_golden_from_path function to improve the handling of existing golden image files. Replace the existing unlink logic with a more robust method that safely removes files or broken symlinks using the missing_ok parameter. This change enhances the reliability of the backup upload process by ensuring that stale references are properly cleared before setting a new golden image path.
121 lines
4.3 KiB
Plaintext
121 lines
4.3 KiB
Plaintext
# ============================================================================
|
|
# GNSS Guard Configuration
|
|
# ============================================================================
|
|
|
|
# =============================================================================
|
|
# ASSET NAME
|
|
# =============================================================================
|
|
ASSET_NAME=OFFICE_LAB
|
|
|
|
# =============================================================================
|
|
# DEPLOYMENT TARGET (used by deploy_client.sh)
|
|
# =============================================================================
|
|
DEPLOY_USER=pi
|
|
# DEPLOY_HOST=10.130.60.253
|
|
DEPLOY_HOST=10.15.80.161
|
|
DEPLOY_PORT=22
|
|
DEPLOY_PASSWORD=sh1pb0x1
|
|
DEPLOY_INJECTED_POSITIONS=.configs/injected_positions_office_lab.json
|
|
|
|
# ============================================================================
|
|
# Timing configuration
|
|
# ============================================================================
|
|
ITERATION_PERIOD_SECONDS=30
|
|
STALE_THRESHOLD_SECONDS=60
|
|
VALIDATION_THRESHOLD_METERS=200
|
|
STARTUP_WARMUP_SECONDS=5
|
|
|
|
# ============================================================================
|
|
# TM AIS GPS Configuration
|
|
# ============================================================================
|
|
TM_AIS_ENABLED=true
|
|
TM_AIS_URL=https://localhost:8443/location
|
|
TM_AIS_TOKEN=xuNg8eewohcieru1Noto
|
|
TM_AIS_MAX_RETRIES=1
|
|
|
|
# ============================================================================
|
|
# Starlink Terminal Configuration
|
|
# ============================================================================
|
|
STARLINK_ENABLED=true
|
|
STARLINK_IP=10.130.60.70
|
|
STARLINK_PORT=9200
|
|
STARLINK_MAX_RETRIES=1
|
|
|
|
# ============================================================================
|
|
# NMEA Primary Vessel GPS Configuration
|
|
# ============================================================================
|
|
NMEA_PRIMARY_ENABLED=true
|
|
NMEA_PRIMARY_IP=10.130.60.61
|
|
NMEA_PRIMARY_PORT=4001
|
|
|
|
# ============================================================================
|
|
# NMEA Secondary Vessel GPS Configuration
|
|
# ============================================================================
|
|
NMEA_SECONDARY_ENABLED=true
|
|
NMEA_SECONDARY_IP=10.130.60.61
|
|
NMEA_SECONDARY_PORT=4002
|
|
|
|
# ============================================================================
|
|
# Storage Configuration
|
|
# ============================================================================
|
|
DATABASE_PATH=data/gnss_guard.db
|
|
LOGS_BASE_PATH=logs
|
|
|
|
# ============================================================================
|
|
# Web Server Configuration
|
|
# ============================================================================
|
|
# Enable/disable web dashboard
|
|
WEB_ENABLED=true
|
|
|
|
# Web server host (0.0.0.0 = all interfaces, 127.0.0.1 = localhost only)
|
|
WEB_HOST=0.0.0.0
|
|
|
|
# Web server port
|
|
WEB_PORT=8080
|
|
|
|
# Show 24h route on map (requires local historical data)
|
|
WEB_SHOW_ROUTE=true
|
|
|
|
# Demo mode: for demo units with pre-loaded historical data
|
|
# When enabled:
|
|
# - Data collection continues normally (real or injected)
|
|
# - Dashboard shows live status (current validation is stored)
|
|
# - Recent "live" records auto-deleted to preserve historical data
|
|
# - NO server sync (validation not sent to cloud)
|
|
# - Route shows last 24h of historical data (excludes live session)
|
|
DEMO_UNIT=true
|
|
|
|
|
|
# Access the dashboard at:
|
|
# - http://localhost:8080
|
|
# - http://<server-ip>:8080
|
|
# - http://guard.lan:8080 (if guard.lan is configured in DNS/hosts)
|
|
|
|
|
|
# ============================================================================
|
|
# Data Retenction Configuration
|
|
# ============================================================================
|
|
|
|
POSITIONS_RAW_RETENTION_DAYS=5
|
|
POSITIONS_VALIDATION_RETENTION_DAYS=5
|
|
LOG_RETENTION_DAYS=14
|
|
|
|
# ============================================================================
|
|
# Server Sync
|
|
# ============================================================================
|
|
|
|
SERVER_ENABLED=true
|
|
SERVER_URL=https://gnss.tototheo.com
|
|
SERVER_TOKEN=a25dee6101b944495a98f2a2c529b926ea01f36807ccb06b18240c7134ea467e
|
|
SERVER_SYNC_BATCH_SIZE=100
|
|
SERVER_SYNC_MAX_QUEUE=1000
|
|
|
|
|
|
# ssh -p 22 pi@10.130.60.253
|
|
# ssh -p 22 -L 8080:localhost:8080 pi@10.130.60.253
|
|
|
|
# Download gnss_guard.db
|
|
# scp pi@10.130.60.253:~/tm-gnss-guard/data/gnss_guard.db ./data/gnss_guard.db
|
|
|
|
# Upload gnss_guard.db
|
|
# scp ./data/gnss_guard.db pi@10.130.60.253:~/tm-gnss-guard/data/gnss_guard.db |