#!/sbin/openrc-run # Copyright 2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 name="openrtrd daemon" description="" command=/usr/bin/rtrd command_args="${rtrd_args}" if [ "${rtrd_user}" != "" ]; then command_user="${rtrd_user}" fi pidfile="/run/${RC_SVCNAME}/${RC_SVCNAME}.pid" depend() { use logger } start_pre() { checkpath -d -m 0755 \ -o "${command_user:-rtrd}:${command_user:-_rpki-client}" \ "/run/${RC_SVCNAME}" } start_post() { if [ -f /var/db/rpki-client/openbgpd ] && [ -S /run/rtrd/rtrd.socket ]; then rtr-import /var/db/rpki-client/openbgpd /run/rtrd/rtrd.socket fi }