From d7e0a8ee6897539b1d12e343c6363553cd3353ec Mon Sep 17 00:00:00 2001 From: Ole-Morten Duesund Date: Sun, 31 Aug 2025 19:39:23 +0200 Subject: [PATCH] fix: Update systemd services to use skyview-adsb user consistently MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change User and Group from 'skyview' to 'skyview-adsb' in service files - Update ReadWritePaths in database update service accordingly - Add external data source configuration to example config 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- config.example.json | 26 +++++++++++++++++++ .../lib/systemd/system/skyview-adsb.service | 3 +++ .../system/skyview-database-update.service | 6 ++--- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/config.example.json b/config.example.json index f275347..bbdb433 100644 --- a/config.example.json +++ b/config.example.json @@ -44,5 +44,31 @@ "history_limit": 1000, "stale_timeout": 60, "update_rate": 1 + }, + "database": { + "path": "", + "max_history_days": 7, + "backup_on_upgrade": true, + "max_open_conns": 10, + "max_idle_conns": 5 + }, + "callsign": { + "enabled": true, + "cache_hours": 24, + "privacy_mode": false, + "sources": { + "openflights_airlines": { + "enabled": true, + "priority": 1 + }, + "openflights_airports": { + "enabled": true, + "priority": 2 + }, + "ourairports": { + "enabled": true, + "priority": 3 + } + } } } \ No newline at end of file diff --git a/debian/lib/systemd/system/skyview-adsb.service b/debian/lib/systemd/system/skyview-adsb.service index c02c5fb..faa3f50 100644 --- a/debian/lib/systemd/system/skyview-adsb.service +++ b/debian/lib/systemd/system/skyview-adsb.service @@ -8,6 +8,9 @@ Wants=network.target Type=simple User=skyview-adsb Group=skyview-adsb +# Update database before starting main service +ExecStartPre=/usr/bin/skyview-data -config /etc/skyview-adsb/config.json update +TimeoutStartSec=300 ExecStart=/usr/bin/skyview -config /etc/skyview-adsb/config.json WorkingDirectory=/var/lib/skyview-adsb StandardOutput=journal diff --git a/debian/lib/systemd/system/skyview-database-update.service b/debian/lib/systemd/system/skyview-database-update.service index 1d344b6..9ab59ef 100644 --- a/debian/lib/systemd/system/skyview-database-update.service +++ b/debian/lib/systemd/system/skyview-database-update.service @@ -6,8 +6,8 @@ Wants=network-online.target [Service] Type=oneshot -User=skyview -Group=skyview +User=skyview-adsb +Group=skyview-adsb ExecStart=/usr/bin/skyview-data update StandardOutput=journal StandardError=journal @@ -17,7 +17,7 @@ NoNewPrivileges=true PrivateTmp=true ProtectSystem=strict ProtectHome=true -ReadWritePaths=/var/lib/skyview /tmp +ReadWritePaths=/var/lib/skyview-adsb /tmp ProtectKernelTunables=true ProtectKernelModules=true ProtectControlGroups=true