Skip to content
This repository has been archived by the owner on Jan 20, 2021. It is now read-only.

SystemD service

BackIsBachus edited this page Aug 31, 2016 · 1 revision

If plan on permanently having MumbleDJ connected to you Mumble server you may prefer to make it run as a daemon or a service on your server instead on running it on a screen (for example). This will allow the bot to automatically connect to the Mumble server when the server starts (if the bot and the server are on the same server) and to restart if it happened to crash

To create the service copy the following config in /etc/systemd/system/mumbledj.service (as root):

[Unit]
Description=MumbleDJ service
After=network.target
[Service]
User=mumbledj
ExecStart=/usr/local/bin/mumbledj -c /etc/mumbledj.yaml
Restart=always
[Install]
WantedBy=multi-user.target

You may want to change the path of the MumbleDJ executable (/usr/local/bin/mumbledj), its config file (/etc/mumbledj.yaml) or the user used to run the bot (mumbledj) depending on your setup.

Now to refresh the list of available services, start the bot at boot and start it for the first time run:

$ sudo systemctl daemon-reload
$ sudo systemctl enable mumbledj.service
$ sudo systemctl start mumbledj.service

You can now check if the service is active by running the following command

$ sudo systemctl status mumbledj.service

If the config file is correct the bot should be connected to your Mumble server and will reconnect automatically if it ever encountered a problem.

Clone this wiki locally