1
0
mirror of https://github.com/azlux/botamusique synced 2024-11-23 13:56:17 +00:00
3 Run botamusique as a daemon In the background
azlux edited this page 2021-01-23 02:08:43 +01:00

There are multiple ways to run the bot as an automatic service.

You can create a systemd service with this file:

[Unit]
Description=XANA

[Service]
ExecStart=/home/azlux/botamusique/venv/bin/python /home/azlux/botamusique/mumbleBot.py -s azlux.fr -u XANA -c Bots
Restart=always
Type=simple
RestartSec=15s
WorkingDirectory=/home/azlux/botamusique

[Install]
WantedBy=multi-user.target

You can use the Supervisor. Here's an example of the configuration file:

[program:bot]
command={path to the bot}/venv/bin/python {path to the bot}/mumbleBot.py --config {path to the bot}/cinfiguration.ini
autostart=true
autorestart=true
startretries=10
startsecs=10
stopwaitsecs=5
user={user name}
environment=HOME='/home/{user name}'