diff options
author | Erwin Lansing <erwin@FreeBSD.org> | 2006-09-12 10:38:42 +0000 |
---|---|---|
committer | Erwin Lansing <erwin@FreeBSD.org> | 2006-09-12 10:38:42 +0000 |
commit | f3f0819ea8f93d7628c266f516d89269cb9fb933 (patch) | |
tree | 653ffc7c244651260ad66e731e0ae227ffaa12b7 /security/amavisd-new | |
parent | ee3760fa9988030b4a376cc87e1f28402f37e485 (diff) | |
download | ports-f3f0819ea8f93d7628c266f516d89269cb9fb933.tar.gz ports-f3f0819ea8f93d7628c266f516d89269cb9fb933.zip |
Notes
Diffstat (limited to 'security/amavisd-new')
-rw-r--r-- | security/amavisd-new/files/p0fanalyzer.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/security/amavisd-new/files/p0fanalyzer.sh b/security/amavisd-new/files/p0fanalyzer.sh new file mode 100644 index 000000000000..77bb4a1f5042 --- /dev/null +++ b/security/amavisd-new/files/p0fanalyzer.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# $FreeBSD$ + +# PROVIDE: p0fanalyzer +# REQUIRE: DAEMON +# BEFORE: amavisd +# KEYWORD: FreeBSD + +p0fanalyzer_enable="${p0fanalyzer_enable-NO}" + +. /etc/rc.subr + +name="p0fanalyzer" +rcvar=`set_rcvar` + +start_cmd=p0fanalyzer_start +stop_cmd=p0fanalyzer_stop + +p0fanalyzer_start() { + checkyesno p0fanalyzer_enable && echo "Starting p0f-analyzer." && \ + /usr/sbin/daemon -p /var/run/p0fanalyzer1.pid \ + /usr/local/bin/p0f -i bge0 -l 'tcp dst port 25' 2>&1 | \ + /usr/sbin/daemon -p /var/run/p0fanalyzer2.pid \ + /usr/local/sbin/p0f-analyzer.pl 2345 +} + +p0fanalyzer_stop() { + /bin/kill `cat /var/run/p0fanalyzer2.pid` + /bin/kill `cat /var/run/p0fanalyzer1.pid` +} + +load_rc_config $name +run_rc_command "$1" |