Date: Wed, 12 May 2010 16:20:12 -0400 (EDT) From: Andy Dills <andy@xecu.net> To: freebsd-questions@freebsd.org Subject: Why doesn't this startup script run? Message-ID: <20100512161505.H37652@shell.xecu.net>
next in thread | raw e-mail | index | archive | help
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 ---
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100512161505.H37652>