From 8a29f6f96d6b9040eae6fdb95be639531c639bc3 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 13 Dec 2019 09:45:10 -0600 Subject: [PATCH] Added systemd .service as example on how to turn a Python script into a service --- tmusic.service | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tmusic.service diff --git a/tmusic.service b/tmusic.service new file mode 100644 index 0000000..164fad6 --- /dev/null +++ b/tmusic.service @@ -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