I've finally nailed the startup script using some examples and reading the rc.d info.. It works for me by I doubt its portable or "valid" currently.. Used
this as reference.. I'm sure there is an easier way to get this going somehow..
Code:
#!/bin/sh
# PROVIDE: minirsyslogd
# REQUIRE: NETWORKING
. /etc/rc.subr
name="minirsyslogd"
rcvar=`set_rcvar`
start_cmd="minirsyslogd_start"
stop_cmd=":"
load_rc_config $name
minirsyslogd_start()
{
if checkyesno ${rcvar}; then
/usr/local/sbin/minirsyslogd --daemon --maxfilesize 2000 --pidfile /var/run/minirsyslogd.pid --umask 007 --split day --rootdir /mylogs/
fi
}
run_rc_command "$1"
This was placed in /usr/local/etc/rc.d/ to keep it separate from base jail.. I still get issues with connectivity when the system reboots.. and before the jail is booted? I guess there is no way around this? Once it's booted looks like it picks up and everything sends.. The syslogd that comes with the jail should be capable of doing this.. Not sure about structuring files etc though..
Edit:
added to rc.conf
syslogd_enable="No" #to disable jail syslogd (no need for local logging - jail dedicated to minirsyslogd)
minirsyslogd_enable="YES"
Lots of important notes if you want to use
minirsyslogd..
Works great for capturing all freenas syslogs (including jails if you configure it).. Routers.. My ubuntu PC.. Anything else you can find with syslog.. Always wanted one of these setup :)