Initial battery monitoring solution added.
This commit is contained in:
32
usr/lib/systemd/system/battery-monitor.service
Normal file
32
usr/lib/systemd/system/battery-monitor.service
Normal file
@@ -0,0 +1,32 @@
|
||||
[Unit]
|
||||
Description=Battery Monitor for Stormux Gaming Image
|
||||
Documentation=man:battery_monitor.py(1)
|
||||
After=multi-user.target
|
||||
ConditionPathExists=/sys/class/power_supply
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/local/bin/battery_monitor.py
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
User=root
|
||||
Group=root
|
||||
|
||||
# Security settings
|
||||
NoNewPrivileges=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
ProtectKernelTunables=yes
|
||||
ProtectKernelModules=yes
|
||||
ProtectControlGroups=yes
|
||||
ReadWritePaths=/var/log
|
||||
ReadOnlyPaths=/sys/class/power_supply
|
||||
|
||||
# Allow access to speech and audio
|
||||
SupplementaryGroups=audio
|
||||
|
||||
# Environment
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user