#!/sbin/openrc-run # Copyright 2019-2026 Gentoo Authors # Copyright 2026 Evann Dreumont # Distributed under the terms of the GNU General Public License v2 name="openbgpd-state-server" description="Serve output from OpenBGPD over HTTP." LOG_FILE="${OPENBGPDSTATESERVER_LOG:-/var/log/${RC_SVCNAME}}" pidfile="/run/${RC_SVCNAME}.pid" command="/usr/bin/${RC_SVCNAME}" command_args="${OPENBGPDSTATESERVER_OPTS}" command_user="${OPENBGPDSTATESERVER_USER:-${RC_SVCNAME}}" command_group="${OPENBGPDSTATESERVER_GROUP:-${RC_SVCNAME}}" command_background=true output_log="${LOG_FILE}" error_log="${LOG_FILE}" retry=15 depend() { need net } start_pre() { checkpath -f -m 0640 -o "${command_user}:${command_group}" "${LOG_FILE}" }