27 lines
650 B
Desktop File
27 lines
650 B
Desktop File
[Unit]
|
|
Description=Battery Monitor for Stormux Gaming Image
|
|
Documentation=man:battery_monitor.py(1)
|
|
After=multi-user.target sound.target
|
|
ConditionPathExists=/sys/class/power_supply
|
|
|
|
[Service]
|
|
Type=simple
|
|
ExecStart=/usr/local/bin/battery_monitor.py
|
|
Restart=always
|
|
RestartSec=30
|
|
User=stormux
|
|
Group=stormux
|
|
|
|
# Allow access to system resources
|
|
SupplementaryGroups=audio video
|
|
|
|
# Environment for audio and speech
|
|
Environment=PYTHONUNBUFFERED=1
|
|
Environment=XDG_RUNTIME_DIR=/run/user/1000
|
|
Environment=PULSE_RUNTIME_PATH=/run/user/1000/pulse
|
|
|
|
# Allow sudo for shutdown without password
|
|
# This requires sudoers configuration
|
|
|
|
[Install]
|
|
WantedBy=default.target |