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 --- net-analyzer/sguil-server/files/sguild.confd | 25 ++++++++++++++++ net-analyzer/sguil-server/files/sguild.initd | 44 ++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 net-analyzer/sguil-server/files/sguild.confd create mode 100644 net-analyzer/sguil-server/files/sguild.initd (limited to 'net-analyzer/sguil-server/files') diff --git a/net-analyzer/sguil-server/files/sguild.confd b/net-analyzer/sguil-server/files/sguild.confd new file mode 100644 index 000000000000..216f6e60ad87 --- /dev/null +++ b/net-analyzer/sguil-server/files/sguild.confd @@ -0,0 +1,25 @@ +# Config file for /etc/init.d/sguild +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +#PATH to the sguild config (sguild.conf) file. +CONF=/etc/sguil/sguild.conf + +#PATH to the sguild config (autocat.conf) file. +AUTOCAT=/etc/sguil/autocat.conf + +#PATH to the sguild global queries (sguild.queries) file. +QUERIES=/etc/sguil/sguild.queries + +#PATH to the sguild users (sguild.users) file. +USERS=/etc/sguil/sguild.users + +#PATH to the sguild access file +ACCESS=/etc/sguil/sguild.access + +#Directory that contains sguild.pem and sguild.key +#Uncomment to enable openssl connectivity +#OPENSSLPATH="/etc/sguil/" + +#For any other options you wish to add +#EXTRA_SGUILD_OPTS= diff --git a/net-analyzer/sguil-server/files/sguild.initd b/net-analyzer/sguil-server/files/sguild.initd new file mode 100644 index 000000000000..e4fec500feb9 --- /dev/null +++ b/net-analyzer/sguil-server/files/sguild.initd @@ -0,0 +1,44 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +[ -z "${CONF}" ] && CONF="/etc/sguil/sguild.conf" +[ -z "${AUTOCAT}" ] && AUTOCAT="/etc/sguil/autocat.conf" +[ -z "${QUERIES}" ] && QUERIES="/etc/sguil/sguild.queries" +[ -z "${USERS}" ] && USERS="/etc/sguil/sguild.users" +[ -z "${ACCESS}" ] && AUTOCAT="/etc/sguil/sguild.access" + +SGUILD_OPTS="-D -c ${CONF} -u ${USERS} -A ${ACCESS}" + +[ -n "${OPENSSLPATH}" ] && SGUILD_OPTS="${SGUILD_OPTS} -o -C ${OPENSSLPATH}" + +depend() { + need net + use mysql +} + +checkconfig() { + [ -f "${CONF}" ] || return 1 + [ -f "${AUTOCAT}" ] || return 1 + [ -f "${QUERIES}" ] || return 1 + [ -f "${USERS}" ] || return 1 + [ -f "${ACCESS}" ] || return 1 + if [ -n "${OPENSSLPATH}" ]; then + [ -f "${OPENSSLPATH}/sguild.key" ] || return 1 + [ -f "${OPENSSLPATH}/sguild.pem" ] || return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting sguild" + start-stop-daemon --start --quiet -c sguil --exec /usr/bin/sguild \ + -- ${SGUILD_OPTS} ${EXTRA_SGUILD_OPTS} -D -P /run/sguild.pid + eend $? +} + +stop() { + ebegin "Stopping sguild" + start-stop-daemon --stop --quiet --pidfile /run/sguild.pid + eend $? +} -- cgit v1.2.3