Alarig Le Lay
0f80da2131
Package-Manager: Portage-3.0.17, Repoman-3.0.2 Signed-off-by: Alarig Le Lay <alarig@swordarmor.fr>
25 lines
638 B
Plaintext
25 lines
638 B
Plaintext
#!/sbin/openrc-run
|
|
# Copyright 2020-2021 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
name="fort validator daemon"
|
|
description="FORT validator is an open source RPKI validator."
|
|
command=/usr/bin/fort
|
|
command_args="${FORT_OPTS}"
|
|
command_user="fort"
|
|
|
|
depend() {
|
|
need net
|
|
}
|
|
|
|
start_pre() {
|
|
if [ -z "${FORT_BASEDIR}" ]; then
|
|
FORT_BASEDIR=$(awk -F '"' '/local-repository/ { print $4 }' \
|
|
/etc/fort/config.json)
|
|
FORT_BASEDIR="${FORT_BASEDIR:-/var/cache/fort/repository/}"
|
|
fi
|
|
|
|
checkpath -d -m 0755 -o fort:fort "$(dirname "${FORT_BASEDIR}")"
|
|
checkpath -d -m 0755 -o fort:fort "${FORT_BASEDIR}"
|
|
}
|