- 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
0.x
Cyril Jaquier 2007-05-03 20:03:13 +00:00
parent 1e767cd8e3
commit a4c9798b18
4 changed files with 123 additions and 1 deletions

View File

@ -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
----------

2
README
View File

@ -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:
--------

View File

@ -0,0 +1,74 @@
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<!--
Hanno 'Rince' Wagner 03 2007
Service manifest for fail2ban
E-Mail: wagner@rince.de
-->
<service_bundle type='manifest' name='fail2ban:fail2ban'>
<service
name='network/fail2ban'
type='service'
version='1'>
<create_default_instance enabled='false' />
<single_instance />
<dependency name='fs'
grouping='require_all'
restart_on='none'
type='service'>
<service_fmri value='svc:/system/filesystem/local' />
</dependency>
<dependency name='net'
grouping='require_all'
restart_on='none'
type='service'>
<service_fmri value='svc:/network/loopback' />
</dependency>
<exec_method
type='method'
name='start'
exec='/lib/svc/method/svc-fail2ban start'
timeout_seconds='-1'>
<method_context>
<method_credential user='root' group='root' />
</method_context>
</exec_method>
<exec_method
type='method'
name='stop'
exec='/lib/svc/method/svc-fail2ban stop'
timeout_seconds='-1'>
</exec_method>
<exec_method
type='method'
name='reload'
exec='/lib/svc/method/svc-fail2ban reload'
timeout_seconds='-1'>
</exec_method>
<exec_method
type='method'
name='refresh'
exec='/lib/svc/method/svc-fail2ban refresh'
timeout_seconds='-1'>
</exec_method>
<exec_method
type='method'
name='restart'
exec='/lib/svc/method/svc-fail2ban restart'
timeout_seconds='-1'>
</exec_method>
</service>
</service_bundle>

View File

@ -0,0 +1,47 @@
#!/usr/bin/bash -e
#
# fail2ban This init.d script is used to start fail2ban.
# (C) by Hanno Wagner <wagner@rince.de>, 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