From a4c9798b186270144b51bb3080eee2c791e318b2 Mon Sep 17 00:00:00 2001 From: Cyril Jaquier Date: Thu, 3 May 2007 20:03:13 +0000 Subject: [PATCH] - Added Solaris 10 files. Thanks to Hanno 'Rince' Wagner git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@575 a942ae1a-1317-0410-a47c-b1dcaea8d605 --- CHANGELOG | 1 + README | 2 +- files/solaris-fail2ban.xml | 74 ++++++++++++++++++++++++++++++++++++++ files/solaris-svc-fail2ban | 47 ++++++++++++++++++++++++ 4 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 files/solaris-fail2ban.xml create mode 100644 files/solaris-svc-fail2ban diff --git a/CHANGELOG b/CHANGELOG index f3a6f7f0..0ba11dcb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -10,6 +10,7 @@ Fail2Ban (version 0.8.0) 2007/05/?? ver. 0.8.0 (2007/05/??) - stable ---------- - Fixed RedHat init script. Thanks to Jonathan Underwood +- Added Solaris 10 files. Thanks to Hanno 'Rince' Wagner ver. 0.7.9 (2007/04/19) - release candidate ---------- diff --git a/README b/README index 8eacfebe..dea0b5ee 100644 --- a/README +++ b/README @@ -74,7 +74,7 @@ Jonathan Kamens, Stephen Gildea, Markus Hoffmann, Mark Edgington, Patrick Börjesson, kojiro, zugeschmiert, Tyler, Nick Munger, Christoph Haas, Justin Shore, Joël Bertrand, René Berber, mEDI, Axel Thimm, Eric Gerbier, Christian Rauch, -Michael C. Haller, Jonathan Underwood +Michael C. Haller, Jonathan Underwood, Hanno 'Rince' Wagner License: -------- diff --git a/files/solaris-fail2ban.xml b/files/solaris-fail2ban.xml new file mode 100644 index 00000000..c6ff0159 --- /dev/null +++ b/files/solaris-fail2ban.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/files/solaris-svc-fail2ban b/files/solaris-svc-fail2ban new file mode 100644 index 00000000..9f75f9f6 --- /dev/null +++ b/files/solaris-svc-fail2ban @@ -0,0 +1,47 @@ +#!/usr/bin/bash -e +# +# fail2ban This init.d script is used to start fail2ban. +# (C) by Hanno Wagner , License is GPL + +#set -x + +. /lib/svc/share/smf_include.sh + +set -e + + +F2B_CONF="/etc/fail2ban/fail2ban.conf" +if [ -n "$2" ] && [ -f "$F2B_CONF" ]; then + F2B_CONF="$2" +fi + +ENV="/usr/bin/env -i LANG=C PATH=/usr/local/bin:/usr/bin:/bin:/opt/sfw/bin:/usr/sfw/bin" + +case $1 in + start) + [ -f /etc/fail2ban.conf ] || touch /etc/fail2ban.conf + echo "Starting fail2ban-server with $F2B_CONF" + eval $ENV /usr/local/bin/fail2ban-client start & + ;; + stop) + echo "Stopping fail2ban-server with $F2B_CONF" + eval $ENV /usr/local/bin/fail2ban-client stop & + ;; + reload | refresh ) + echo "Reloading fail2ban-server with $F2B_CONF" + eval $ENV /usr/local/bin/fail2ban-client reload & + ;; + restart | force-reload) + echo "Forcing reload of fail2ban-server with $F2B_CONF" + eval $ENV /usr/local/bin/fail2ban-client stop & + sleep 2 + eval $ENV /usr/local/bin/fail2ban-client start & + ;; + status) + /usr/local/bin/fail2ban-client status & + ;; + *) + echo "Usage: /lib/svc/method/svc-fail2ban start|stop|status|refresh|restart|reload|force-reload" >&2 + exit 2 + ;; +esac