added routerconfig-to-wiki script

This commit is contained in:
2011-06-08 19:04:37 +02:00
parent 9b80112201
commit e2febe9725
3 changed files with 124 additions and 0 deletions

22
wikify.routerconfig/getall.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/sh
HOSTS="
r1 r2 r3
switch1 switch2 switch3
"
for HOST in $HOSTS ; do
rm -f ./fetchedconfig
./getconfig.ex $HOST 2> /dev/null > /dev/null
if [ -e ./fetchedconfig ]; then
#DATE=`date -u --rfc-3339=seconds`
#echo "! fetched from $HOST on $DATE" > ${HOST}-config.txt
cat ./fetchedconfig > ${HOST}-config.txt
rm -f ./fetchedconfig
./wikiupdate ${HOST} ./${HOST}-config.txt
rm -f ./${HOST}-config.txt
else
echo "unable to fetch config for $HOST"
fi
done