]> git.somenet.org - pub/jan/mattermost-bot.git/blob - somebot.service
requirements.txt
[pub/jan/mattermost-bot.git] / somebot.service
1 #
2 # Mattermost Bot.
3 #  Copyright (c) 2016-2022 by Someone <someone@somenet.org> (aka. Jan Vales <jan@jvales.net>)
4 #  published under MIT-License
5 #
6 # user systemd unit
7 #
8 # sudo touch /var/lib/systemd/linger/$USER
9 # mkdir -p ~/.config/systemd/user/
10 # cp somebot.service ~/.config/systemd/user/
11 # export XDG_RUNTIME_DIR=/run/user/$UID
12 # systemctl --user daemon-reload
13 # systemctl --user enable systemd-tmpfiles-setup.service systemd-tmpfiles-clean.timer somebot.service
14 # systemctl --user start systemd-tmpfiles-setup.service systemd-tmpfiles-clean.timer somebot.service
15
16 [Unit]
17 Description=Someone's Mattermost bot
18
19 [Service]
20 Type=idle
21 WorkingDirectory=/%h/mattermost-somebot/
22 ExecStart=/usr/bin/python3 -Bu main.py
23 Restart=always
24 RestartSec=15
25
26 [Install]
27 WantedBy=default.target