Hi,
I've created a small startup script (below) that prepares freenas to be used with my munin monitoring system and some other things..
It runs as expected but the part with the "patched" inetd config seems to be reset by the freenas system (probably by the enabled tftp service) and overwritten. So my proposition is to make sure the post init script is executed after all other services has been executed.
__________________________________________________
#!/bin/bash
if grep -q munin /etc/services; then
echo "services exist"
else
echo "services does not exist"
echo "munin 4949/tcp # Munin" >>/etc/services
fi
if grep -q munin /etc/inetd.conf; then
echo "inetd exist"
else
echo "inetd does not exist"
echo "munin stream tcp nowait root /usr/libexec/tcpd /mnt/zpool/munin-node" >>/etc/inetd.conf
service inetd restart
fi
if grep -q "filter(f_warning); destination(loghost);" /etc/local/syslog-ng.conf; then
echo "syslog mod exist"
else
echo "syslog mod does not exist"
perl -p -i -e 's/destination\(loghost\)/filter\(f_warning\); destination\(loghost\)/' /etc/local/syslog-ng.conf
service syslog-ng restart
fi
if kldstat | grep -q ipmi; then
echo "ipmi loaded"
else
kldload ipmi.ko
fi
I've created a small startup script (below) that prepares freenas to be used with my munin monitoring system and some other things..
It runs as expected but the part with the "patched" inetd config seems to be reset by the freenas system (probably by the enabled tftp service) and overwritten. So my proposition is to make sure the post init script is executed after all other services has been executed.
__________________________________________________
#!/bin/bash
if grep -q munin /etc/services; then
echo "services exist"
else
echo "services does not exist"
echo "munin 4949/tcp # Munin" >>/etc/services
fi
if grep -q munin /etc/inetd.conf; then
echo "inetd exist"
else
echo "inetd does not exist"
echo "munin stream tcp nowait root /usr/libexec/tcpd /mnt/zpool/munin-node" >>/etc/inetd.conf
service inetd restart
fi
if grep -q "filter(f_warning); destination(loghost);" /etc/local/syslog-ng.conf; then
echo "syslog mod exist"
else
echo "syslog mod does not exist"
perl -p -i -e 's/destination\(loghost\)/filter\(f_warning\); destination\(loghost\)/' /etc/local/syslog-ng.conf
service syslog-ng restart
fi
if kldstat | grep -q ipmi; then
echo "ipmi loaded"
else
kldload ipmi.ko
fi