fix: Correct systemd configuration and Debian package setup

- Fix database update service to include config path parameter
- Move ConditionACPower from [Timer] to [Unit] section in timer config
- Add database directory to ReadWritePaths in main service
- Set explicit database path in Debian package config template
- Simplify postinst script to be quiet and use consistent skyview-adsb user
- Update README.Debian with comprehensive systemd service documentation
- Remove confusing dual-user setup in favor of single skyview-adsb user

SystemD Configuration Summary:
- Main service: skyview-adsb.service with database pre-update
- Database service: skyview-database-update.service (oneshot)
- Weekly timer: skyview-database-update.timer (Sunday 3AM with randomization)
- All services use skyview-adsb user consistently
- Database path: /var/lib/skyview-adsb/skyview.db
- Config path: /etc/skyview-adsb/config.json

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2025-08-31 19:59:29 +02:00
commit 779384b748
6 changed files with 169 additions and 123 deletions

View file

@ -1,125 +1,140 @@
SkyView for Debian
==================
SkyView is a multi-source ADS-B aircraft tracker that connects to dump1090 Beast
format TCP streams and provides a web-based interface for aircraft tracking.
SkyView is a multi-source ADS-B aircraft tracker with comprehensive database integration
for enhanced aviation data and callsign lookup functionality.
Configuration
------------
Post-Installation Setup
-----------------------
The main configuration file is located at:
/etc/skyview/config.json
After installation, SkyView automatically:
- Creates skyview-adsb user and required directories
- Initializes SQLite database with aviation data sources
- Configures systemd services
This file contains:
- Server configuration (port, host)
- List of dump1090 sources to connect to
- Application settings
Required Configuration
----------------------
Example configuration for multiple receivers:
Edit the main configuration file:
/etc/skyview-adsb/config.json
```json
{
"server": {
"host": "",
"port": 8080
},
"sources": [
{
"id": "site1",
"name": "Site 1 Receiver",
"host": "192.168.1.100",
"port": 30005,
"latitude": 51.4700,
"longitude": -0.4600,
"altitude": 50.0,
"enabled": true
},
{
"id": "site2",
"name": "Site 2 Receiver",
"host": "192.168.1.101",
"port": 30005,
"latitude": 51.4800,
"longitude": -0.4500,
"altitude": 45.0,
"enabled": true
}
],
"settings": {
"history_limit": 1000,
"stale_timeout": 60,
"update_rate": 1
}
}
```
Update at minimum:
- Source coordinates (latitude/longitude) for your ADS-B receiver locations
- Origin coordinates for map center
- ADS-B receiver connection details (host/port)
See /usr/share/doc/skyview-adsb/CONFIGURATION.md for complete configuration options.
Service Management
-----------------
------------------
SkyView runs as a systemd service. Use these commands to manage it:
SkyView includes two systemd services:
# Start the service
sudo systemctl start skyview
Main Service:
sudo systemctl start skyview-adsb
sudo systemctl enable skyview-adsb # Auto-start on boot
sudo systemctl status skyview-adsb
sudo journalctl -u skyview-adsb -f # View logs
# Stop the service
sudo systemctl stop skyview
Database Update Service (runs weekly):
sudo systemctl start skyview-database-update # Manual update
sudo systemctl enable --now skyview-database-update.timer # Enable weekly updates
sudo systemctl status skyview-database-update.timer
# Restart the service
sudo systemctl restart skyview
Database Management
-------------------
# Enable auto-start on boot
sudo systemctl enable skyview
View database status:
skyview-data -config /etc/skyview-adsb/config.json status
# Disable auto-start on boot
sudo systemctl disable skyview
Update aviation databases:
skyview-data -config /etc/skyview-adsb/config.json update
# Check service status
sudo systemctl status skyview
Optimize database storage:
skyview-data -config /etc/skyview-adsb/config.json optimize
# View logs
sudo journalctl -u skyview -f
List available data sources:
skyview-data -config /etc/skyview-adsb/config.json list
Web Interface
------------
-------------
Once started, the web interface is available at:
http://localhost:8080
Access the web interface at: http://localhost:8080
The interface provides:
Features include:
- Real-time aircraft tracking map
- Aircraft table with filtering and sorting
- Statistics dashboard
- Coverage and signal strength visualization
- 3D radar view (optional)
- Enhanced callsign information with airline details
- Database status monitoring at /database
- Aircraft history and trail visualization
- Coverage and signal strength analysis
- 3D radar view
External Data Sources
---------------------
SkyView includes three aviation databases:
- OpenFlights Airlines (~6,162 airlines)
- OpenFlights Airports (~7,698 airports)
- OurAirports (~83,557 airports worldwide)
Privacy Mode: Set "privacy_mode": true in config to disable external data loading.
Files and Directories
--------------------
---------------------
/usr/bin/skyview - Main executable
/etc/skyview/config.json - Configuration file
/var/lib/skyview/ - Application data directory
/var/log/skyview/ - Log files
/lib/systemd/system/skyview.service - Systemd service file
Executables:
/usr/bin/skyview - Main ADS-B tracker service
/usr/bin/skyview-data - Database management utility
/usr/bin/beast-dump - Raw ADS-B data analysis tool
Configuration:
/etc/skyview-adsb/config.json - Main configuration file
Data:
/var/lib/skyview-adsb/ - Application and database directory
/var/log/skyview-adsb/ - Log files
Services:
/lib/systemd/system/skyview-adsb.service - Main service
/lib/systemd/system/skyview-database-update.service - Database updater
/lib/systemd/system/skyview-database-update.timer - Weekly update timer
Documentation:
/usr/share/doc/skyview-adsb/CONFIGURATION.md - Complete configuration guide
/usr/share/doc/skyview-adsb/DATABASE.md - Database schema reference
Security
--------
SkyView runs as the unprivileged 'skyview' user for security. The service has
restricted capabilities and filesystem access.
SkyView runs as the unprivileged 'skyview-adsb' user with comprehensive systemd security hardening:
- NoNewPrivileges, ProtectSystem=strict, ProtectHome=true
- Private temporary directories and device access restrictions
- Restricted namespaces and capabilities
Troubleshooting
--------------
---------------
1. Check service status:
sudo systemctl status skyview
1. Check main service status:
sudo systemctl status skyview-adsb
2. View recent logs:
sudo journalctl -u skyview --no-pager -l
sudo journalctl -u skyview-adsb --no-pager -l
3. Test configuration:
sudo -u skyview /usr/bin/skyview -config /etc/skyview/config.json
3. Test database connectivity:
skyview-data -config /etc/skyview-adsb/config.json status
4. Check network connectivity to dump1090 sources:
telnet <host> <port>
4. Manual database update:
sudo -u skyview-adsb skyview-data -config /etc/skyview-adsb/config.json update
For more information, visit: https://github.com/skyview/skyview
5. Check ADS-B source connectivity:
telnet <receiver_host> <receiver_port>
6. View database information in web interface:
http://localhost:8080/database
For complete documentation, see:
- /usr/share/doc/skyview-adsb/CONFIGURATION.md
- /usr/share/doc/skyview-adsb/DATABASE.md
- man skyview(1), man skyview-data(1), man beast-dump(1)
Project repository: https://kode.naiv.no/olemd/skyview