32 lines
646 B
Desktop File
32 lines
646 B
Desktop File
[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 |