LuKreme: > On 15-May-2009, at 04:18, Wietse Venema wrote: > > LuKreme: > >> On 14-May-2009, at 17:29, mouss wrote: > >>> LuKreme a _crit : > >>>> I think I have it all sussed out, except there doesn_t seem to be > >>>> an > >>>> init script installed under FreeBSD. > >> > >>> because fail2ban works on freebsd? > >> > >> I meant a script to start fail2ban, like in rc.d (init.d in Linux). > >> Am > >> I the only person calling these init scripts? Startup scripts? Point > >> is, fail2ban is not setup to start automatically after being > >> installed > >> from ports. > > > > FreeBSD ports require an appropriate "yes" parameter setting in > > /etc/rc.conf, and have their startup scripts in /usr/local/etc/rc.d, > > And it is this startup script that is not included in the fail2ban > port install.
Perhaps it is possible to steal from an existing script, for example something from a different port can serve as an example. Wietse #!/bin/sh # . /etc/rc.subr name="fail2ban" rcvar=`set_rcvar` load_rc_config $name # Set these in /etc/rc.conf. test -z "$fail2ban_enable" && fail2ban_enable="NO" test -z "$fail2ban_user" && fail2ban_user="nobody" # Rudimentary, only "start" is implemented. case "$1" in start) case "$fail2ban_enable" in [Yy][Ee][Ss]) su $fail2ban_user -c 'fail2ban ...other args... &' ;; esac esac