diff options
author | pgollucci <pgollucci@FreeBSD.org> | 2009-06-01 14:19:04 +0800 |
---|---|---|
committer | pgollucci <pgollucci@FreeBSD.org> | 2009-06-01 14:19:04 +0800 |
commit | 2a4a52c984dc813b6a9725e4505b4eca8d0e6717 (patch) | |
tree | 290040cf6cacf1cbb296ab224eb12cf61487cf31 /security/py-fail2ban | |
parent | 78703a948fb1bd4f319d7c6e583ad5a59af5c9c5 (diff) | |
download | freebsd-ports-gnome-2a4a52c984dc813b6a9725e4505b4eca8d0e6717.tar.gz freebsd-ports-gnome-2a4a52c984dc813b6a9725e4505b4eca8d0e6717.tar.zst freebsd-ports-gnome-2a4a52c984dc813b6a9725e4505b4eca8d0e6717.zip |
- Add an rc.d script
Submitted by: sd@mostnet.ru (via e-mail)
Diffstat (limited to 'security/py-fail2ban')
-rw-r--r-- | security/py-fail2ban/Makefile | 3 | ||||
-rw-r--r-- | security/py-fail2ban/files/fail2ban.in | 30 |
2 files changed, 33 insertions, 0 deletions
diff --git a/security/py-fail2ban/Makefile b/security/py-fail2ban/Makefile index c132ee957450..c0640be3ec3e 100644 --- a/security/py-fail2ban/Makefile +++ b/security/py-fail2ban/Makefile @@ -7,6 +7,7 @@ PORTNAME= fail2ban PORTVERSION= 0.8.3 +PORTREVISION= 1 CATEGORIES= security python MASTER_SITES= SF PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -21,6 +22,8 @@ USE_BZIP2= yes USE_PYTHON= yes USE_PYDISTUTILS= yes +USE_RC_SUBR= fail2ban + PYDISTUTILS_INSTALLARGS+= --install-purelib=${PYTHON_SITELIBDIR} \ --install-data=${ETCDIR} diff --git a/security/py-fail2ban/files/fail2ban.in b/security/py-fail2ban/files/fail2ban.in new file mode 100644 index 000000000000..15ccb1f04463 --- /dev/null +++ b/security/py-fail2ban/files/fail2ban.in @@ -0,0 +1,30 @@ +#!/bin/sh +# +# PROVIDE: fail2ban +# REQUIRE: DAEMON +# KEYWORD: shutdown + +fail2ban_enable=${fail2ban_enable-"NO"} +fail2ban_flags=${fail2ban_flags-""} +fail2ban_pidfile=${fail2ban_pidfile-"/var/run/fail2ban/fail2ban.pid"} + +. %%RC_SUBR%% + +name="fail2ban" +rcvar=`set_rcvar` +pidfile="${fail2ban_pidfile}" + +command="%%PREFIX%%/bin/fail2ban-server" +command_interpreter="%%PYTHON_CMD%%" +client="%%PREFIX%%/bin/fail2ban-client" + +extra_commands="reload jailstatus" + +start_cmd="${client} ${fail2ban_flags} start" +stop_cmd="${client} ${fail2ban_flags} stop" +reload_cmd="${client} ${fail2ban_flags} reload" +jailstatus_cmd="${client} ${fail2ban_flags} status" + +load_rc_config $name + +run_rc_command "$1" |