This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
LOCKFILE=/tmp/.wb.lck | |
HOST=web01.fisys.us | |
BACKUPHOST=25.23.239.150 | |
DOCROOT=/var/www | |
EXCLUDEDB='schema\|mysql' | |
EXCLUDE=.git | |
DATE=`date +%Y-%m-%d.%H%M` | |
BACKUPDIR=/mnt/backup | |
BACKUPFILE=$BACKUPDIR/$HOST.backup-$DATE.tar.bz2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IP=`cat /tmp/ip` | |
PUBIP=`curl -s http://icanhazip.com` | |
[email protected] | |
if [ "$IP" != "$PUBIP" ]; then | |
echo $PUBIP|mail -s "IP changed at home" $EMAIL | |
echo $PUBIP > /tmp/ip | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[email protected] | |
host=`ifconfig eth0|grep inet\ addr|cut -d: -f2|awk {'print $1'}` | |
check=`dig +short @$host localhost|awk {'print $1'}` | |
if [ $check != 127.0.0.1 ] | |
then | |
# Uncomment the next line for testing. | |
#echo "He's dead, Jim." | |
service named restart | |
grep named /var/log/messages|tail -300 |mail -s "Named failed on `hostname`" $contact |
NewerOlder