SwordArMor-gentoo-overlay/net-misc/routinator/files/routinator-initd

25 lines
685 B
Plaintext
Raw Permalink Normal View History

2019-12-31 18:21:19 +01:00
#!/sbin/openrc-run
# Copyright 2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
name="routinator daemon"
description="An RPKI relying party software"
command=/usr/bin/routinator
2019-12-31 22:33:49 +01:00
command_args="--syslog --base-dir=${ROUTINATOR_BASEDIR} server
${ROUTINATOR_OPTS}"
pidfile="/run/${RC_SVCNAME}.pid"
command_args_background="--detach --pid-file=${pidfile}"
2019-12-31 18:21:19 +01:00
depend() {
need net
}
start_pre() {
checkpath -d -m 0750 -o routinator:routinator /var/lib/routinator
if [ ! -d "${ROUTINATOR_BASEDIR}/repository" ] || \
2019-12-31 22:33:49 +01:00
[ ! -d "${ROUTINATOR_BASEDIR}/tals" ]; then
${command} --base-dir=${ROUTINATOR_BASEDIR} init \
--decline-arin-rpa
2019-12-31 18:21:19 +01:00
fi
}