Files
nixos-core/scripts/dynu/dynu.service
T
kiskaadee 306db58c32 refactor(dynu): enhance resilience and systemd hardening
- Implement multi-provider HTTP fallback loop in ip-monitor.sh
- Add strict systemd sandboxing (ProtectSystem, PrivateTmp, NoNewPrivileges)
- Improve error observability by capturing stderr in discovery attempts
- Add atomic file sync and invariant checks for systemd execution
- Update documentation to reflect hardened protocol and state management
2026-04-25 15:02:22 -05:00

28 lines
638 B
Desktop File

# This service is responsible for updating the Dynu DDNS record with the current IP address
# Copy this to /etc/systemd/system/dynu.service
# This script is intended to run via systemd
[Unit]
Description=Dynu IP Monitor & Updater
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
User=root
Group=root
StateDirectory=dynu
EnvironmentFile=/etc/conf.d/dynu-environment
ExecStart=/usr/local/bin/ip-monitor.sh
StandardOutput=journal
StandardError=journal
TimeoutSec=30
# Optional hardening (safe defaults)
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/lib/dynu