forked from Just-Some-Bots/MusicBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
musicbot.service.example
40 lines (29 loc) · 1.41 KB
/
musicbot.service.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# This is an example of a systemd service file for MusicBot.
#
# You should copy and rename this file before you edit it!
#
# For details about systemd service files, see the following links:
# https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html
# https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html
[Unit]
Description=Just-Some-Bots/MusicBot a discord.py bot that plays music.
# Only start this service after networking is ready.
After=network.target
[Service]
# These options are useful if you set up MusicBot under a dedicated user account.
# Uncomment and set these to an existing User name and Group name.
# If you do not set these, MusicBot may run as root! You've been warned!
#User=mbuser
#Group=mbusergroup
# Replace mbdirectory to the file path where MusicBot was cloned into.
WorkingDirectory=mbdirectory
# Replace mbdirectory same as above, also update the python path as needed for your system.
ExecStart=/usr/bin/pythonversionnum mbdirectory/run.py --no-checks
# Set the condition under which the service should be restarted.
# Using on-failure allows the bot's shutdown command to actually stop the service.
# Using always will require you to stop the service via the service manager.
Restart=on-failure
# Time to wait between restarts. This is useful to avoid rate limits.
RestartSec=6
[Install]
WantedBy=default.target