SwordArMor-gentoo-overlay/net-misc/FORT-validator/files/fort-initd

31 lines
612 B
Plaintext
Raw Normal View History

2020-02-16 22:38:09 +01:00
#!/sbin/openrc-run
# Copyright 2020 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"
pidfile="/run/${RC_SVCNAME}.pid"
command_background=true
retry=20
2020-02-16 22:38:09 +01:00
depend() {
need net
}
start_pre() {
checkpath -d -m 0750 -o fort:fort ${FORT_BASEDIR}
if [ "${RC_CMD}" = "restart" ] ; then
RUNNING_RSYNC="full"
while [ "${RUNNING_RSYNC}" ]; do
sleep 5
RUNNING_RSYNC=$(pgrep -u fort rsync)
return 0
done
fi
2020-02-16 22:38:09 +01:00
}