[Unit]
Description=Hosts File Monitor and Auto-Restore Service
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/hosts-file-monitor.sh
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal

# Environment
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# Security settings
NoNewPrivileges=false
PrivateTmp=true

# Resource limits
MemoryMax=50M
CPUQuota=10%

[Install]
WantedBy=multi-user.target
