Added systemd .service as example on how to turn a Python script into a service

This commit is contained in:
David Daily 2019-12-13 09:45:10 -06:00
parent c4fae63e48
commit 8a29f6f96d

14
tmusic.service Normal file
View File

@ -0,0 +1,14 @@
[Unit]
Description=Telegram Music Bot
[Service]
User=david
Group=david
Restart=always
RestartSec=10
Type=default
WorkingDirectory=/home/david/tmusic
ExecStart=/home/david/.local/share/virtualenvs/tmusic-l3mWxOyb/bin/python3 music.py
[Install]
WantedBy=multi-user.target