mirror of
https://github.com/42wim/matterbridge.git
synced 2025-04-20 14:47:55 +02:00
Add sample OpenRC service
parent
d46e0908a6
commit
c197a10b72
@ -1,18 +1,20 @@
|
||||
A sample systemd to run matterbridge in the background, restarting if necessary.
|
||||
# systemd
|
||||
|
||||
A sample systemd unit to run matterbridge in the background, restarting if necessary.
|
||||
|
||||
/lib/systemd/system/matterbridge.service
|
||||
```
|
||||
```dosini
|
||||
[Unit]
|
||||
Description=Matterbridge Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
ExecStart=/opt/mattermost/matterbridge-1.21.0/matterbridge -debug -conf matterbridge.toml
|
||||
ExecStart=/opt/mattermost/matterbridge-1.24.0/matterbridge -debug -conf matterbridge.toml
|
||||
TimeoutStartSec=3600
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
WorkingDirectory=/opt/mattermost/matterbridge-1.21.0
|
||||
WorkingDirectory=/opt/mattermost/matterbridge-1.24.0
|
||||
User=mattermost
|
||||
Group=mattermost
|
||||
LimitNOFILE=49152
|
||||
@ -22,8 +24,32 @@ WantedBy=multi-user.target
|
||||
```
|
||||
Reload systemd with `sudo systemctl daemon-reload`
|
||||
|
||||
Enable with `sudo systemctl enable matterbridge.`
|
||||
Enable with `sudo systemctl enable matterbridge`
|
||||
|
||||
Start with `sudo systemctl start matterbridge`
|
||||
|
||||
Created by Minecraftchest1
|
||||
Created by Minecraftchest1
|
||||
|
||||
# OpenRC
|
||||
|
||||
A sample OpenRC service to run matterbridge in the background.
|
||||
|
||||
/etc/init.d/matterbridge
|
||||
```sh
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 2021-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
command=/usr/bin/matterbridge
|
||||
command_args="-conf ${MATTERBRIDGE_CONF:-/etc/matterbridge/matterbridge.toml} ${MATTERBRIDGE_ARGS}"
|
||||
command_user="mattermost:mattermost"
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
command_background=1
|
||||
|
||||
depend() {
|
||||
need net
|
||||
}
|
||||
```
|
||||
Enable with `sudo rc-update add matterbridge default`
|
||||
|
||||
Start with `sudo rc-service matterbridge start`
|
Loading…
x
Reference in New Issue
Block a user