| 1 | #!/sbin/openrc-run |
| 2 | # Copyright 2021-2022 Gentoo Authors |
| 3 | # Distributed under the terms of the GNU General Public License v2 |
| 4 | |
| 5 | command=/usr/bin/matterbridge |
| 6 | command_args="-conf ${MATTERBRIDGE_CONF:-/etc/matterbridge/bridge.toml} ${MATTERBRIDGE_ARGS}" |
| 7 | command_user="matterbridge:matterbridge" |
| 8 | pidfile="/run/${RC_SVCNAME}.pid" |
| 9 | command_background=1 |
| 10 | output_log="/var/log/${RC_SVCNAME}.log" |
| 11 | error_log="${output_log}" |
| 12 | |
| 13 | depend() { |
| 14 | need net |
| 15 | } |
| 16 | |
| 17 | start_pre() { |
| 18 | checkpath -f "${output_log}" -o "${command_user}" || return 1 |
| 19 | } |
| 20 | |