summaryrefslogtreecommitdiffstats
path: root/contrib/matterbridge.openrc
diff options
context:
space:
mode:
authorjan Anja <bs@sysrq.in>2022-02-21 02:24:42 +0500
committerGitHub <noreply@github.com>2022-02-20 22:24:42 +0100
commite7b3ebf98aad0277f6679fb5d44a9e6740ab11a4 (patch)
tree83060e1fc53d237885443298b246173ffb793980 /contrib/matterbridge.openrc
parent5bc18fb7805e246b8193bd190751fbdb19825364 (diff)
downloadmatterbridge-msglm-e7b3ebf98aad0277f6679fb5d44a9e6740ab11a4.tar.gz
matterbridge-msglm-e7b3ebf98aad0277f6679fb5d44a9e6740ab11a4.tar.bz2
matterbridge-msglm-e7b3ebf98aad0277f6679fb5d44a9e6740ab11a4.zip
Add OpenRC service file (#1746)
Diffstat (limited to 'contrib/matterbridge.openrc')
-rwxr-xr-xcontrib/matterbridge.openrc19
1 files changed, 19 insertions, 0 deletions
diff --git a/contrib/matterbridge.openrc b/contrib/matterbridge.openrc
new file mode 100755
index 00000000..a3e188f4
--- /dev/null
+++ b/contrib/matterbridge.openrc
@@ -0,0 +1,19 @@
+#!/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/bridge.toml} ${MATTERBRIDGE_ARGS}"
+command_user="matterbridge:matterbridge"
+pidfile="/run/${RC_SVCNAME}.pid"
+command_background=1
+output_log="/var/log/${RC_SVCNAME}.log"
+error_log="${output_log}"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ checkpath -f "${output_log}" -o "${command_user}" || return 1
+}