aboutsummaryrefslogtreecommitdiffstats
path: root/main/sshguard/sshguard.initd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-02-12 10:11:21 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-02-12 10:11:21 +0000
commitb1c23cfe8fff7571899e39ed6dd2a9cf3043fd39 (patch)
tree6f617fc0217566edb7bcb7d0f8d00808a3305ef5 /main/sshguard/sshguard.initd
parent5d7f87f856d5ab5c13148f781a309af5c9ceff02 (diff)
downloadaports-b1c23cfe8fff7571899e39ed6dd2a9cf3043fd39.tar.bz2
aports-b1c23cfe8fff7571899e39ed6dd2a9cf3043fd39.tar.xz
main/sshguard: moved from testing
Diffstat (limited to 'main/sshguard/sshguard.initd')
-rw-r--r--main/sshguard/sshguard.initd25
1 files changed, 25 insertions, 0 deletions
diff --git a/main/sshguard/sshguard.initd b/main/sshguard/sshguard.initd
new file mode 100644
index 0000000000..89ec7d592c
--- /dev/null
+++ b/main/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 $?
+}