BACKRUSH  À¯´Ð½º¸í·É  ´ÙÀ½  ÀÚ·á½Ç  Ascii Table   ¿ø°ÝÁ¢¼Ó  ´Þ·Â,½Ã°£   ÇÁ·Î¼¼½º   ½©
ÁöÇÏö³ë¼±   RFC¹®¼­   SUN FAQ   SUN FAQ1   C¸Þ´º¾ó   PHP¸Þ´º¾ó   ³Ê±¸¸®   ¾Æ½ºÅ°¿ùµå ¾ÆÀÌÇǼ­Ä¡

±Û¾´ÀÌ: backrush [user,¹ö­”,µµ¸ÞÀÎ,db]»èÁ¦ Á¶È¸¼ö: 14915


while [ : ]
do

clear
echo "################################################################"
echo " Input : 1 ===> DB »èÁ¦ ,°èÁ¤»èÁ¦, µð·ºÅ丮»èÁ¦"
echo " Input : 2 ===> »ç¿ë±ÇÇѸ¸ Á¦°Å µð·ºÅ丮¹«»èÁ¦ "
echo " Input : 3 ===> »ç¿ë±ÇÇÑ µÇµ¹¸² ¹× º¹±¸ "
echo " Input : q ===> ÀÛ¾÷ Á¾·á "
echo "################################################################"
echo "Input :\c"
read x
if [ $x ]
then
:
else
echo "³Î°ªÀ̱º¿ä"
continue
fi

if [ $x = "q" ]
then
exit 0
fi
echo "User Account:\c"
read user
if [ $user ]
then
:
else
echo "³Î°ªÀ̱º¿ä"
continue
fi

grep $user /etc/passwd >/null/nulluser
if [ -s /null/nulluser ]
then
:
else
echo "¾ø´Â »ç¿ëÀÚÀÔ´Ï´Ù"
continue
fi

if [ $x = "1" ]
then
echo "delete from db where user='$user';" > /null/del.mysql
echo "delete from user where user='$user';" >> /null/del.mysql
echo "drop database $user;" >> /null/del.mysql
echo "flush privileges;" >> /null/del.mysql
/usr/local/mysql/bin/mysql -uroot -pdlg mysql< /null/del.mysql
chown $user /home/$user
userdel -r $user
cp /var/name/backrushcom.zone /null
grep -v $1.backrush.com. /null/backrushcom.zone > /null/zone.tmp
cp /null/zone.tmp /var/name/backrushcom.zone

A=`cat -n /home/www/conf/httpd.conf |grep "/home/$user/docs" | awk '{print $1}'`
B=`cat -n /home/www/conf/httpd.conf |tail -1 | awk '{print $1}'`
num=`expr $A - 3`
head -n $num /home/www/conf/httpd.conf > /null/httpd.conf.tmp
num=`expr $A + 4`
tnum=`expr $B - $num`
tail -$tnum /home/www/conf/httpd.conf >> /null/httpd.conf.tmp
cp /null/httpd.conf.tmp /home/www/conf/httpd.conf

fi

if [ $x = "2" ]
then
chown root /home/$user
chmod 700 /home/$user
fi

if [ $x = "3" ]
then
chown $user /home/$user
chmod 711 /home/$user
fi
done

°ü·Ã±Û : ¾øÀ½ ±Û¾´½Ã°£ : 2006/10/29 12:48 from 61.82.164.84

  ¿ë·®Ã£±â²Ç¼ö ¸ñ·Ïº¸±â »õ±Û ¾²±â Áö¿ì±â ÀÀ´ä±Û ¾²±â ±Û ¼öÁ¤ [user,db,domain,¹öö,À̸ÞÀÏ]»ý¼º  
BACKRUSH  À¯´Ð½º¸í·É  ´ÙÀ½  ÀÚ·á½Ç  Ascii Table   ¿ø°ÝÁ¢¼Ó  ´Þ·Â,½Ã°£   ÇÁ·Î¼¼½º   ½©
ÁöÇÏö³ë¼±   RFC¹®¼­   SUN FAQ   SUN FAQ1   C¸Þ´º¾ó   PHP¸Þ´º¾ó   ³Ê±¸¸®   ¾Æ½ºÅ°¿ùµå ¾ÆÀÌÇǼ­Ä¡