[mrtg] automating mrtg with perl

Timo Klinger klinger at mindgap.de
Tue Oct 16 14:31:30 MEST 2001


hi,

i wrote a simple script for automating the configuration (see it 
at the bottom). i use apache under win2k with activeperl installed.
the script hangs if i start it, but the files are correctly done.
only the temp-config-file is still there and it´s still locked so 
it can´t be deleted. i found nothing about a similar problem. do 
you have any hint for me?

please apologize my shool-only english.

kind regards,
timo.

my script:

#!perl.exe
$index = "c:/wwwroot/indexfiles";
$config = "c:/wwwroot/configfiles";
$perl = "c:/perl/bin/perl.exe";
$mrtg = "c:/mrtg/bin";	
$router = "routername";
print "Content-type: text/html\n\n";
print "<html><head><title>CGI-Feedback</title></head><br><br>\n";
mkdir "$index/$router";
system "$perl $mrtg/cfgmaker --global \"Options[\_]: growright, bits\" 
--ifref=descr --ifdesc=descr public\@$router --global \"WorkDir: 
$index/$router\" --output $config/$router.cfg";
system "$perl $mrtg/mrtg $config/$router.cfg";
system "$perl $mrtg/indexmaker --output $index/$router/index.html 
$config/$router.cfg";
print "</body></html>\n";





 
 



--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list