Ignore:
Timestamp:
Aug 30, 2010, 2:18:14 PM (14 years ago)
Author:
rock
Message:

Add: Automatic packaging drbl-virt (tar_drbl-virt.sh)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • drbl-virt/sbin/functions_drbl_virt

    r195 r202  
    8383# [Check Debian Xen package]
    8484function check_debian_xen(){
     85echo "[Check Xen package in apt server]"
     86echo ""
    8587aptitude update
    8688check_debian_xen_pkg=$(aptitude search xen-linux-system)
     
    300302Xen_MAC_5=""
    301303Xen_MAC_6=""
     304VM_Host_totoal_nu=$(cat $Work_Home/etc/IP_VM_$eth | wc -l)
    302305
    303306# backup
     
    307310
    308311# generate MAC
    309 for (( i=1 ; i<"$VM_Host_totoal_nu" ; i++ ))
     312for (( i=1 ; i<="$VM_Host_totoal_nu" ; i++ ))
    310313do
    311314    if [ $i -lt 10 ]; then
     
    325328    fi
    326329done
     330
     331# delete tmp file
     332rm /tmp/drbl-virt_MAC
    327333}
    328334
     
    403409
    404410}
     411
     412
     413# [Creat drbl-virter user]
     414function creat_drbl-virter(){
     415useradd -m -s /bin/bash drbl-virter
     416}
     417
     418
     419# [Download tomcat and mv drbl-virt.wat to wepapps]                           
     420function install_tomcat_and_mv_drbl-virt(){
     421if [ ! -e $Work_Home/tomcat-7.0.2.tar.gz ]; then
     422wget http://drbl-virt.googlecode.com/files/tomcat-7.0.2.tar.gz -P $Work_Home
     423fi                         
     424tar zxvf $Work_Home/tomcat-7.0.2.tar.gz -C $Work_Home/
     425mv $Work_Home/drbl-virt.war $Work_Home/tomcat-7.0.2/webapps/
     426chown -R drbl-virter.drbl-virter $Work_Home/tomcat-7.0.2
     427su  drbl-virter -c "$Work_Home/tomcat-7.0.2/bin/startup.sh"
     428}
Note: See TracChangeset for help on using the changeset viewer.