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

±Û¾´ÀÌ: backrush [user,db,domain,¹öö,À̸ÞÀÏ]»ý¼º Á¶È¸¼ö: 12504


#!/bin/sh

while [ : ]
do
clear
echo "==============================================================="
echo "ACCOUNT MANAGEMENT(À¯Á®¼º»ý,mysql,¼­ºêµµ¸ÞÀÎ,¹ööȣ½ºÆÃ,À̸ÞÀÏ)"
echo "Á¾·á½Ã »ç¿ëÀÚ°èÁ¤:q ÀÔ·Â "
echo "==============================================================="
echo "»ç¿ëÀÚ°èÁ¤:\c"
read user
if [ $user = "q" ]
then
exit 0
fi
echo "»ç¿ëÀÚÀ̸§:\c"
read name
echo "»ç¿ëÀÚ E-mail:\c"
read email


auser=`cat /etc/passwd|cut -d':' -f 1,1|grep $user`

if [ "$user" = "$auser" ]then
echo "»ç¿ëÀÚ°¡ ÀÖ½À´Ï´Ù."
echo "retry"
exit
fi

useradd -d /home/$user -g 1003 -s /bin/csh -m -c $name $user
passwd $user
echo "==============================================================="
echo "==================== User Created ========================="
echo "==============================================================="
echo "
<VirtualHost 218.38.148.154>
ServerAdmin stone@backrush.com
DocumentRoot /home/$user/docs
ServerName $user.backrush.com
ErrorLog logs/error_log
CustomLog logs/access_log common
</VirtualHost>">> /home/www/conf/httpd.conf

echo "$user.backrush.com. IN A 218.38.148.154" >>/var/name/backrushcom.zone
/bin/killer named
/usr/local/sbin/named
/home/www/bin/apachectl restart
echo "==============================================================="
echo "==================== Virtual Domain Created ==============="
echo "==============================================================="

mysqlpass="/usr/local/mysql/bin/mysql"
root="xxxxx"
echo "Mysql Password:\c"
read pass
if [ -s mysqltmp ]
then
rm mysqltmp
fi

echo "create database $user;" > mysqltmp
echo "insert into user values ('localhost','$user',password('$pass'),'N','N','N'
,'N','N','N','N','N','N','N','N','N','N','N');">>mysqltmp

echo "insert into db values('localhost','$user','$user','Y','Y','Y','Y','Y','Y',
'Y','Y','Y','Y');" >>mysqltmp

echo "flush privileges;">>mysqltmp
$mysqlpass -uroot -p$root mysql <mysqltmp
echo "==============================================================="
echo "==================== Mysql User Created ==================="
echo "==============================================================="

echo "===============================================================">ss
echo "====== Welcome to Backrush Service =======">>ss
echo "===============================================================">>ss
echo "¹æ°©½À´Ï´Ù $name´Ô ºÎµð Çо÷ÀûÀÎ ¸ñÀû¿¡¸¸ ¾²À̱⸦... ">>ss
echo "Áß¿äÇÑÀÚ·á´Â º°µµ·Î ¹é¾÷À» ºÎŹµå¸³´Ï´Ù. ">>ss
echo "º» BackrushÀÇ ÃëÁö¿¡ ¾î±ß³­ ÇàÀ§³ª À̻󽺷± ¼­ºñ½º">>ss
echo "(À½¾Ç,°ÔÀÓ,¿Í·¹Áî,¹æ¼Û,Çо÷¿¡ ¾î±ß³ª´Â »çÀÌÆ®) ">>ss
echo "ƯÈ÷ Ÿ ¼­¹ö¿Í ¿¬µ¿ÇÏ¿© °Ô½ÃÆǸ¸ »ç¿ëÇÏ´Â ¾å»ðÇÑ »ç¶÷µéÀº ">>ss
echo "»çÀýÀÔ´Ï´Ù">>ss
echo "ºÎµð ÀÚ½ÅÀÇ ¹ßÀüÀûÀÎ ¿ëµµ¿¡ ¾²À̽ñ⸦ °£ÀýÈ÷ ¹Ù¶ø´Ï´Ù.">>ss
echo "===============================================================">>ss
echo "BACKRUSH Çϵå¿þ¾î ÀÚ¿ø">>ss
echo "The sparcv9 processor operates at 400 MHz * 4EA">>ss
echo "(4)[darak]/home/stone > prtconf|grep Mem">>ss
echo "Memory size: 2048 Megabytes">>ss
echo "(5)[darak]/home/stone > uname -a">>ss
echo "SunOS darak 5.7 Generic_106541-19 sun4u sparc SUNW,Ultra-4">>ss
echo "===============================================================">>ss
echo "BACKRUSH ¼ÒÇÁÆ®¿þ¾î ÀÚ¿ø">>ss
echo "¾ð¾î:C,C++,PHP,JAVA,Python,JSP,CGI,Shell">>ss
echo "Database:Oracle,Mysql">>ss
echo "À¥¾îÇø®ÄÉÀ̼Ç:Apache+PHP+CGI+ORACLE+MYSQL">>ss
echo "===============================================================">>ss
echo "BACKRUSH ±âº»¼­ºñ½º">>ss
echo "1.Telnet Service">>ss
echo " login:$user password:$pass">>ss
echo "2.Mysql Service">>ss
echo " Mysqldb:$user Mysql user:$user Mysql passwd:$pass">>ss
echo "3.Subdomain Service">>ss
echo " $user.backrush.com ȨÆäÀÌÁöµð·ºÅ丮´Â docsÀÔ´Ï´Ù.">>ss
echo "±âŸ Áú¹®»çÇ×Àº ÇØ´ç °Ô½ÃÆÇÀ» ÀÌ¿ëÇϼ¼¿ä">>ss
s="[Backrush]°èÁ¤»ý¼ºµÇ¾ú½À´Ï´Ù"
mailx -s "$s" $email < ss
done

°ü·Ã±Û : ¾øÀ½ ±Û¾´½Ã°£ : 2003/07/30 3:32 from 61.82.164.84

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