muninlite/examples/post-muninlite.ini

42 lines
1.4 KiB
INI
Raw Normal View History

#!/bin/sh
# 2007-06-07 Kai Ove Gran
#
# This script will configure and launch muninlite on floppyfw
# (http://www.zelow.no/floppyfw/. Keep in mind that you floppyfw will have to
# be compiled with support for inetd for this to work.
# You will also have to open tcp port 4949 from the host running munin.
#
# Please read about how to configure muninlite at:
# http://sourceforge.net/projects/muninlite
#
# Please read about how to configure munin at:
# http://munin.projects.linpro.no/
# If munin is running on a host outside your local network, you will have to
# move this line to your firewall.init and change x.x.x.x to the IP of the
# external host. IT IS NOT RECOMMENDED TO ALLOW CONNECTIONS TO YOUR FLOPPYFW
# FROM AN EXTERNAL HOST! This might be a security risk.
#iptables -A INPUT -p TCP --dport 4949 -s x.x.x.x -j ACCEPT
if [ -f /sbin/inetd ]; then
if grep "^lrrd" /etc/inetd.conf >/dev/null 2>&1; then
echo "muninlite can not start as lrrd is already in use"
exit 1
else
echo "lrrd stream tcp nowait root /usr/bin/munin-node" >> /etc/inetd.conf
fi
PID=$(ps | grep -v grep | grep inetd | sed 's/^ \{1,\}//' | cut -d\ -f1)
if [ ! -z "$PID" ]; then
echo "inetd already running.. restarting.."
kill -HUP $PID
else
echo "Starting inetd."
inetd /etc/inetd.conf
fi
else
echo "inetd not found, not installing muninlite"
fi