Deploying Tomcat Scripts

Source: Internet
Author: User
#!/bin/sh deploy_path= $DEPLOY _target_location is_elastic=%private__suportelastic% #IS_ELASTIC = ' false '; if [! $IS _elastic] | | [$IS _elastic = true]; Then application_url= $PRIVATE __download_file_url fi if [$IS _elastic = false]; Then application_url=%private__application_url% fi if [! $APPLICATION _url]; Then echo "In deploy Tomcat script the Application_url is empty" Exit fi if [! $DEPLOY _PA TH]; Then echo "The Deploy path is empty" deploy_path= "/usr/local/tomcat/webapps" fi #analyze%private__applic

ation_url% arr= (${application_url//\//}) length=${#arr [@]} private__application_package_name=${arr[$length-1]} echo "Deploy path" $DEPLOY _path echo "Application name" $PRIVATE __application_package_name remove_file=${private__ application_package_name%.*} CD $DEPLOY _path rm-rf remove_file* rm-rf docs examples Host-manager Manager wget-o $PRIVA Te__application_package_name $APPLICATION _url file_type=${private__application_package_name##*.} echo "File type is" $file _type if [$file _type = "GZ"] then echo "Unzip tool tar ..." tar-zxf $PRIVAT E__application_package_name elif [$file _type = "tar"] then echo "Unzip tool tar ..." TAR-XF $PRIVATE __a Pplication_package_name elif [$file _type = "zip"] then echo "Unzip tool nuzip ..." Unzip-o $PRIVATE __appl Ication_package_name elif [$file _type = = "war"] then echo "War ..." fi

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.