mirror of
https://github.com/kuhyx/scripts.git
synced 2026-07-04 15:03:09 +02:00
- Remove 'disable' option from setup_midnight_shutdown.sh - Add shutdown-timer-monitor.sh that watches the timer every 30s - Re-enables timer automatically if someone tries to disable it - Monitor service installed alongside the timer - Makes it significantly harder to bypass the shutdown schedule - Similar pattern to hosts-file-monitor.service
28 lines
545 B
Desktop File
28 lines
545 B
Desktop File
[Unit]
|
|
Description=Shutdown Timer Monitor and Auto-Restore Service
|
|
After=network-online.target day-specific-shutdown.timer
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=root
|
|
ExecStart=/usr/local/bin/shutdown-timer-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
|