Why doesn't this startup script run?
Andy Dills
andy at xecu.net
Wed May 12 20:50:51 UTC 2010
I'm working on integrating p0f with amavisd-new, and the command I need
to run at startup is a little unwieldy:
p0f -l 'tcp dst port 25' 2>&1 | /usr/local/bin/p0f-analyzer.pl 2345 &
At first, I tried putting that in /etc/rc.local. No luck, don't know why
it doesn't run. Ok, I tell myself, rc.local is a dinosaur anyway, take a
second and make a simple rc.d script.
So, I made /usr/local/etc/rc.d/p0fd containing:
---
#!/bin/sh
#
. "/etc/rc.subr"
name="p0f"
rcvar=`set_rcvar`
command="/usr/local/bin/p0f"
command_args="-l 'tcp dst port 25' 2>&1 | /usr/local/bin/p0f-analyzer.pl 2345 &"
pidfile="/var/run/$name.pid"
# read configuration and set defaults
load_rc_config "$name"
: ${p0f_enable="NO"}
run_rc_command "$1"
---
If I run "/usr/local/etc/rc.d/p0fd start" it fires right up. However, it
still continues to refuse to run on boot.
Any suggestions?
(yes, it's executable, and yes I have p0f_enable="YES" in rc.conf)
Thanks,
Andy
---
Andy Dills
Xecunet, Inc.
www.xecu.net
301-682-9972
---
More information about the freebsd-questions
mailing list