diff options
Diffstat (limited to 'app-admin/sshguard/files')
-rw-r--r-- | app-admin/sshguard/files/sshguard.confd | 21 | ||||
-rw-r--r-- | app-admin/sshguard/files/sshguard.initd | 24 |
2 files changed, 45 insertions, 0 deletions
diff --git a/app-admin/sshguard/files/sshguard.confd b/app-admin/sshguard/files/sshguard.confd new file mode 100644 index 000000000000..326f8918aaa4 --- /dev/null +++ b/app-admin/sshguard/files/sshguard.confd @@ -0,0 +1,21 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Config file for /etc/init.d/sshguard +# See sshguard(8) for details. + +# Initial (empty) options. +SSHGUARD_OPTS="" + +# Files to monitor +# -l <source> +SSHGUARD_OPTS="${SSHGUARD_OPTS} -l /var/log/auth.log" + +# White listing +# -w <addr/host/block/file> +#SSHGUARD_OPTS="${SSHGUARD_OPTS} -w 192.168.0.0/24" + +# Define how long in milliseconds start-stop-daemon waits to check that +# sshguard is still running before calling success or failure. +# Values lower than the default of 999 are probably not useful. +SSHGUARD_WAIT="999" diff --git a/app-admin/sshguard/files/sshguard.initd b/app-admin/sshguard/files/sshguard.initd new file mode 100644 index 000000000000..f1360ce8610b --- /dev/null +++ b/app-admin/sshguard/files/sshguard.initd @@ -0,0 +1,24 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + after iptables + use logger +} + +SSHGUARD_PIDFILE=${SSHGUARD_PIDFILE:-/var/run/${SVCNAME}.pid} + +start() { + ebegin "Starting sshguard" + [ -z "${SSHGUARD_WAIT}" ] && SSHGUARD_WAIT=999 + start-stop-daemon --start --wait ${SSHGUARD_WAIT} --background --quiet --exec \ + /usr/sbin/sshguard -- -i ${SSHGUARD_PIDFILE} ${SSHGUARD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping sshguard" + start-stop-daemon --stop -p ${SSHGUARD_PIDFILE} + eend $? +} |