From 016073b2275520820849a2c82a189c3cb19af5a5 Mon Sep 17 00:00:00 2001 From: kaiog Date: Fri, 15 Jun 2007 09:36:16 +0000 Subject: [PATCH] Added post-boot script for floppyfw git-svn-id: svn://svn.code.sf.net/p/muninlite/code/muninlite@8 35caa317-6b62-4e8a-81c0-b04f0c356266 --- examples/post-muninlite.ini | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 examples/post-muninlite.ini diff --git a/examples/post-muninlite.ini b/examples/post-muninlite.ini new file mode 100644 index 0000000..7fe90c2 --- /dev/null +++ b/examples/post-muninlite.ini @@ -0,0 +1,41 @@ +#!/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