oplik0/cherrydoor

View on GitHub
cherrydoor.service

Summary

Maintainability
Test Coverage
#Assumes that cherrydoor folder is in /var/ - change if required
[Unit]
Description=Cherrydoor Service

[Service]

WorkingDirectory=/var/cherrydoor
ExecStart=/usr/bin/python3 /var/cherrydoor/main.py

# Disable Python's buffering of STDOUT and STDERR, so that output from the
# service shows up immediately in systemd's logs
Environment=PYTHONUNBUFFERED=1

# Automatically restart the service if it crashes
Restart=on-failure

Type=simple

User=pi
[Install]

# Tell systemd to automatically start this service when the system boots
# (assuming the service is enabled)
WantedBy=multi-user.target