5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-12-25 04:55:41 +00:00

Add OpenRC service file (#1746)

This commit is contained in:
jan Anja 2022-02-21 02:24:42 +05:00 committed by GitHub
parent 5bc18fb780
commit e7b3ebf98a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

19
contrib/matterbridge.openrc Executable file
View File

@ -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
}