diff --git a/Service-files.md b/Service-files.md index 1482676..114b204 100644 --- a/Service-files.md +++ b/Service-files.md @@ -2,33 +2,25 @@ A sample systemd unit to run matterbridge in the background, restarting if necessary. -/lib/systemd/system/matterbridge.service +`/etc/systemd/system/matterbridge.service`, remember to correct `ExecStart=` and `User=` + ```dosini [Unit] -Description=Matterbridge Server -After=network.target +Description=Matterbridge daemon +After=network-online.target [Service] -Type=notify -ExecStart=/opt/mattermost/matterbridge-1.24.0/matterbridge -debug -conf matterbridge.toml -TimeoutStartSec=3600 +Type=simple +ExecStart=/path/to/your/matterbridge/binary -conf /path/to/your/matterbridge.toml Restart=always -RestartSec=10 -WorkingDirectory=/opt/mattermost/matterbridge-1.24.0 -User=mattermost -Group=mattermost -LimitNOFILE=49152 +RestartSec=5s +User=matterbridge [Install] WantedBy=multi-user.target ``` -Reload systemd with `sudo systemctl daemon-reload` -Enable with `sudo systemctl enable matterbridge` - -Start with `sudo systemctl start matterbridge` - -Created by Minecraftchest1 +Reload systemd with `sudo systemctl daemon-reload`, enable on system start and now with `sudo systemctl enable --now matterbridge.service` # OpenRC