From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- www-servers/boa/files/boa.initd | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 www-servers/boa/files/boa.initd (limited to 'www-servers/boa/files/boa.initd') diff --git a/www-servers/boa/files/boa.initd b/www-servers/boa/files/boa.initd new file mode 100644 index 000000000000..fe9b63efe1d6 --- /dev/null +++ b/www-servers/boa/files/boa.initd @@ -0,0 +1,28 @@ +#!/sbin/openrc-run +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# NB: Standard config is in /etc/boa/boa.conf +# NB: Arguments to pass to boa are in /etc/conf.d/boa + +command=/usr/sbin/boa +command_args="${BOA_OPTS}" +pidfile="/run/boa.pid" + +depend() { + need net +} + +start_pre() { + if [ -e /etc/conf.d/boa ] && [ -n "${BOA_OPTS}" ]; then + SR="$(echo ${BOA_OPTS} | awk '{ FS = " " } { print $2 }')" + else + SR=/etc/boa + fi + + if [ ! -e ${SR}/boa.conf ] ; then + eerror "You need a ${SR}/boa.conf to run Boa" + eerror "There is a sample file in /usr/share/docs/boa" + return 1 + fi +} -- cgit v1.2.3