Named correctly, and fixed to work with Le Potato
This commit is contained in:
26
KH-clock.service
Normal file
26
KH-clock.service
Normal file
@@ -0,0 +1,26 @@
|
||||
[Unit]
|
||||
Description=KH Clock Display
|
||||
After=network.target
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=pi
|
||||
WorkingDirectory=/opt/KH_Clock
|
||||
|
||||
# Tell SDL to render via KMS/DRM (required on Le Potato and similar ARM boards)
|
||||
Environment=SDL_VIDEODRIVER=kmsdrm
|
||||
|
||||
# Disable console blanking so the TV stays on
|
||||
ExecStartPre=/bin/sh -c 'echo -ne "\033[9;0]" > /dev/tty1'
|
||||
|
||||
# If using a virtualenv (recommended):
|
||||
ExecStart=/opt/KH_Clock/venv/bin/python3 /opt/KH_Clock/main.py
|
||||
# If using system Python instead, replace the line above with:
|
||||
# ExecStart=/usr/bin/python3 /opt/KH_Clock/main.py
|
||||
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user