summaryrefslogtreecommitdiff
path: root/community/sshguard/sshguard.rc
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/sshguard/sshguard.rc
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/sshguard/sshguard.rc')
-rwxr-xr-xcommunity/sshguard/sshguard.rc26
1 files changed, 26 insertions, 0 deletions
diff --git a/community/sshguard/sshguard.rc b/community/sshguard/sshguard.rc
new file mode 100755
index 000000000..4b8dee06f
--- /dev/null
+++ b/community/sshguard/sshguard.rc
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting SSHGuard"
+ tail -n0 -F /var/log/auth.log | /usr/sbin/sshguard -b /var/db/sshguard/blacklist.db &> /dev/null &
+ add_daemon sshguard
+ stat_done
+ ;;
+ stop)
+ stat_busy "Stopping SSHGuard"
+ kill `pidof sshguard` &> /dev/null
+ rm_daemon sshguard
+ stat_done
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+*)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0