Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matterbridge as a linux systemd service #176

Closed
wants to merge 1 commit into from

Conversation

realrolfje
Copy link

Add scripts to have matterbridge run as a systemd daemon in Linux.

@42wim
Copy link
Owner

42wim commented May 23, 2017

Hi, thanks for the PR!
It seems like a mix between a sysv initscript and systemd though?

@realrolfje
Copy link
Author

Could be. I cobbled it together based on the mattermost init.d script, I'm no expert. We needed it because when a connection drops, de bridge seemed to stop working. I decided that having it as a service would be nice, so we can do an easy restart, while also having the benefit of automatic starting at boot.

If you have tips or pointers on how to improve the script I'd be happy to improve this pull request.

@42wim
Copy link
Owner

42wim commented May 25, 2017

An example for a true systemd service unit can be found here
#116 (comment)

Normally you put those files in /etc/systemd/system

The daemon-reload, enable and start commands remain the same.

@heinrich5991
Copy link
Contributor

I have this:

[Unit]
Description=matterbridge
After=network.target

[Service]
ExecStart=/usr/bin/matterbridge -conf /etc/matterbridge/bridge.toml
User=matterbridge
Group=matterbridge

[Install]
WantedBy=multi-user.target

Should I make a pull request? It's helpful when projects have some standard service files. :)

@42wim
Copy link
Owner

42wim commented Sep 21, 2017

@heinrich5991 looks good, sure, go ahead :)

@patcon
Copy link
Contributor

patcon commented Nov 3, 2017

FYI, this is something related, which we could consider directing folks toward instead of including init scripts :)
https://github.com/jordansissel/pleaserun

@patcon
Copy link
Contributor

patcon commented Nov 3, 2017

So this would mean:

sudo mkdir -p /opt/matterbridge/bin
sudo cp matterbridge-$ARCH /opt/matterbridge/bin
gem install pleaserun
sudo pleaserun --install /opt/matterbridge/bin/matterbridge

Puts it in the users hands to install ruby, but then it works on any platform pleaserun supports :)

heinrich5991 added a commit to heinrich5991/matterbridge that referenced this pull request Nov 3, 2017
42wim pushed a commit that referenced this pull request Nov 3, 2017
@42wim
Copy link
Owner

42wim commented Nov 3, 2017

@patcon feel free to edit stuff about this on the wiki, I'm going to close this PR now as @heinrich5991 #291 is merged.

@42wim 42wim closed this Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants