8
echo "Remote node must provide IP"
12
reip="^`echo $ip | sed -e 's,\.,\\.,g'`$"
14
# Make sure its installed
15
apt-get -y install munin-node libcache-cache-perl
17
if grep -q "^allow $reip$" /etc/munin/munin-node.conf ; then
18
echo $ip already has access.
20
echo "# added by $0 `date`" >> /etc/munin/munin-node.conf
21
echo allow $reip >> /etc/munin/munin-node.conf
22
service munin-node reload
25
# now tell remote server about our IP
26
relation-set ip=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'|head -n 1`