From 62f8033cef0a3d5f78163c901e8b039e814aa292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anna=20=E2=80=9CCyberTailor=E2=80=9D?= Date: Sun, 20 Feb 2022 22:55:30 +0500 Subject: [PATCH] Add OpenRC service file --- contrib/matterbridge.openrc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 contrib/matterbridge.openrc 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 +}