Skip to content

Instantly share code, notes, and snippets.

@Inndy
Last active August 23, 2016 14:49
Show Gist options
  • Select an option

  • Save Inndy/e6f3e8bf9d2d62bb694180853340b329 to your computer and use it in GitHub Desktop.

Select an option

Save Inndy/e6f3e8bf9d2d62bb694180853340b329 to your computer and use it in GitHub Desktop.
systemd service sample

Template

[Unit]
Description=Bottled LED Matrix Render Service
After=syslog.target

[Service]
Type=simple
User=www-data
Group=www-data
WorkingDirectory=/var/led
ExecStart=/usr/bin/python3 /var/led/led.py
Restart=on-abort
RestartSec=2

[Install]
WantedBy=multi-user.target

Service Installation

  1. Put file into /lib/systemd/system with name ${SERVICE}.service
  2. systemctl enable ${SERVICE}.service
  3. systemctl start ${SERVICE}.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment