#!/bin/bash #Joe McManus #backup linksys firewall #set some variables hostname=wrt54g.foo.bar.com basedir=/data/network-backups user=userame pass=password mailto=joe@foo.com #Get the config and save as hostname-date.config.bin wget https://$hostname/Config.bin --user=$pass --password=$pass --no-check-certificate -O $basedir/$hostname-`date +%Y-%m-%d`.config.bin #check to see if it worked if [ $? != 0 ] then echo "Error: Backup failed" mail -s"Error: Backup of $hostname failed at `date`" $mailto