The service was failing with 'Read-only file system' when trying to create discovered_sensors.json in the /etc/sensorpajen config directory. Changes: - config.py: Add STATE_DIR for runtime state - System mode: /var/lib/sensorpajen (writable at runtime) - Dev mode: config/ (same as config directory) - config.py: Use STATE_DIR for discovered_sensors.json path - debian/postinst: Create and own /var/lib/sensorpajen - debian/sensorpajen.service: Add /var/lib/sensorpajen to ReadWritePaths - debian/postinst: Remove discovered_sensors.json.example copy (created at runtime) This separates: - Config: /etc/sensorpajen (static, not updated by service) - State: /var/lib/sensorpajen (dynamic, updated by service at runtime)
44 B
44 B