diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-01-04 13:30:13 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-01-04 13:30:13 +0000 |
commit | eec431f357781096bc422bda299267861c03929f (patch) | |
tree | 014c3d91a1c30d57544711b8dc4f9c14b079daa9 /testing/sshguard/sshguard.initd | |
parent | 8fac686b7e08fe6d34f92f520a2782a63173d613 (diff) | |
download | aports-eec431f357781096bc422bda299267861c03929f.tar.bz2 aports-eec431f357781096bc422bda299267861c03929f.tar.xz |
testing/sshguard: new aport
Log monitor that blocks with iptables on bad behaviour
http://www.sshguard.net/
Diffstat (limited to 'testing/sshguard/sshguard.initd')
-rw-r--r-- | testing/sshguard/sshguard.initd | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/sshguard/sshguard.initd b/testing/sshguard/sshguard.initd new file mode 100644 index 000000000..89ec7d592 --- /dev/null +++ b/testing/sshguard/sshguard.initd @@ -0,0 +1,25 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/sshguard/files/sshguard.initd,v 1.3 2011/04/25 04:59:43 jer Exp $ + +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 $? +} |