SwordArMor-gentoo-overlay/net-misc/routinator/files/routinator-initd
Alarig Le Lay f507109f7f
net-misc/routinator: WIP: version bump to 0.7.0_rc1
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
2020-04-23 19:20:30 +02:00

27 lines
824 B
Plaintext
Executable file

#!/sbin/openrc-run
# Copyright 2019-2020 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
command_args="--syslog --base-dir=${ROUTINATOR_BASEDIR} server
${ROUTINATOR_OPTS}"
pidfile="/run/${RC_SVCNAME}.pid"
command_args_background="--detach --pid-file=${pidfile}"
depend() {
need net
}
start_pre() {
checkpath -d -m 0750 -o routinator:routinator "${ROUTINATOR_BASEDIR}"
if [ ! -d "${ROUTINATOR_BASEDIR}/repository" ] || \
[ ! -d "${ROUTINATOR_BASEDIR}/tals" ]; then
${command} --base-dir=${ROUTINATOR_BASEDIR} init \
--decline-arin-rpa
chown -R routinator:routinator "${ROUTINATOR_BASEDIR}"/repository
chown -R routinator:routinator "${ROUTINATOR_BASEDIR}"/tals
fi
}