Script en bash para generar configuraciones de MRTG

Hice un script en bash para generar cfgs de mrtg con cfgmaker y genera el index con indexmaker, este script es muy util para ISPs que manejan muchos routers.

mrtg.jpg

Metan esto en un archivo .sh

#/bin/bash!

echo “Nombre del Cliente:”

read NAME

echo “Direccion IP:”

read IPADR

echo “SNMP Read Community:”

read SNMP

cfgmaker –global WorkDir:/var/www/html/routers/$NAME –global ‘Options[_]:bits,growright’ –output /etc/mrtg/cfgs/$NAME.cfg $SNMP@$IPADR

mkdir /var/www/html/routers/$NAME

indexmaker /etc/mrtg/cfgs/$NAME.cfg –output=/var/www/html/routers/$NAME/index.html

Eso es todo! modifiquen los path a su conveniencia.


bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark
tabs-top


Deja tu Comentario