22 |
# vim:ts=4:sw=4:tw=78 |
# vim:ts=4:sw=4:tw=78 |
23 |
|
|
24 |
# User defined constants |
# User defined constants |
25 |
use constant BASEDIR => '/home/nicolaw/webroot/www/rrd.me.uk'; |
use constant BASEDIR => '/var/www/rrd'; |
26 |
|
|
27 |
############################################################ |
############################################################ |
28 |
|
|
85 |
my @pairs; |
my @pairs; |
86 |
while (<>) { |
while (<>) { |
87 |
#warn "$host $_"; |
#warn "$host $_"; |
88 |
|
$host = $1 if m/^#\s*host\s*(\S+)/; |
89 |
next unless /^\d+\.[\w\.\-\_\d]+\s+[\d\.]+\s*$/; |
next unless /^\d+\.[\w\.\-\_\d]+\s+[\d\.]+\s*$/; |
90 |
push @pairs, $_; |
push @pairs, $_; |
91 |
} |
} |