mirror of
https://git.freebsd.org/ports.git
synced 2025-06-22 21:20:31 -04:00
Changelog: https://www.nlnetlabs.nl/news/2022/Nov/10/routinator-0.12.0-released/ PR: 267891
37 lines
800 B
Bash
37 lines
800 B
Bash
#!/bin/sh
|
|
|
|
# PROVIDE: routinator
|
|
# REQUIRE: DAEMON
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
|
|
. /etc/rc.subr
|
|
|
|
desc="RPKI signed route collector and validator"
|
|
name=routinator
|
|
rcvar=routinator_enable
|
|
|
|
load_rc_config ${name}
|
|
|
|
: ${name_enable:=NO}
|
|
: ${wrkdir:=/var/routinator}
|
|
|
|
pidfile=${wrkdir}/${name}.pid
|
|
routinator_config=${routinator_conf:-"%%ETCDIR%%/routinator.conf"}
|
|
required_file=${routinator_config}
|
|
start_precmd=check_init
|
|
command="%%PREFIX%%/bin/${name}"
|
|
command_args="-c ${routinator_config} --rsync-command=%%PREFIX%%/bin/rsync server -d --user %%USERS%% --group %%GROUPS%% --pid-file=${pidfile} --working-dir=${wrkdir}"
|
|
|
|
check_init()
|
|
{
|
|
if [ ! -d ${wrkdir} ]; then
|
|
echo
|
|
echo -n "Need to create repository ${wrkdir} "
|
|
echo "see man routinator"
|
|
echo
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
run_rc_command "$1"
|