az in script baraye update kardanesh estefade kardam :
#!/bin/bash
RED='\E[1;31m'
GRN='\E[1;32m'
RES='\E[0m'
echo -e "${RED} Upgrade to BIND 9.4.1 (Slackware11.0) ${RES} "
echo -e "${GRN} Making Backup ${RES} ..."
cp /etc/named.conf .
cp -r /etc/rndc.key .
cp -r /var/named .
rm -rf ./named/named.run
echo -e "${GRN} Downloading Package ${RES} ..."
wget -nv http://ftp.isc.org/isc/bind9/9.4.1/bind-9.4.1.tar.gz
echo -e "${GRN} Decompressing Package ${RES} ..."
tar -zxf ./bind-9.4.1.tar.gz
echo -e "${GRN} Configuring Package ${RES} ..."
cd ./bind-9.4.1
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var > /dev/null
echo -e "${GRN} Compiling Package ${RES} ..."
make > /dev/null
echo -e "${GRN} Removing Old Package ${RES} ..."
removepkg bind > /dev/null
echo -e "${GRN} Installing New Package ${RES} ..."
make install > /dev/null 2>&1
cd ..
echo -e "${GRN} Restoring Backup ${RES} ..."
mv ./named.conf /etc/named.conf
mv ./rndc.key /etc/rndc.key
rm -rf /var/named
mv ./named /var/
rm -rf ./bind-9.4.1
echo -e "${GRN} Cleaning Up ${RES} ..."
rm -rf bind-9.4.1.tar.gz
echo -e "${GRN} Restarting BIND ${RES} ..."
/etc/rc.d/rc.bind restart
echo -e "${RED} $(named -v) successfuly installed ${RES} "
No comments:
Post a Comment