Automatically download the source code _ and Compile _ package _ deployment _ Restart the service shell script

Source: Internet
Author: User
Tags svn

The various operating meanings of the shell in this, can refer to my three years ago this article:http://blog.csdn.net/jadyer/article/details/7960802

#!/bin/shapp_name=engineapp_wars=jadyerengine-web/targetapp_path=/app/tomcat-6.0.43app_code=sourcecodesvn_url=    Https://svn.sinaapp.com/jadyer/2/repository/jadyerengine[email protected]svn_pswd= Xuan Yu Apppid=0getapppid () { Pidinfo= ' PS aux|grep java|grep $APP _path|grep-v grep ' If [-N ' $pidInfo]; Then apppid= ' echo $pidInfo | awk ' {print $} ' else Apppid=0 Fi}downloadandcompilesourcecode () {CD $APP _path mkdir $APP _code svn --username $SVN _user--password $SVN _pswd checkout $SVN _url $APP _code cd $APP _code mvn clean Package-dskiptests}shu Tdown () {getapppid echo "[Xuan Yu] ==================================================================================== ================================================================== "If [$appPID-ne 0]; Then Echo-n "[Xuan Yu] stopping $APP _path (pid= $appPID) ..." kill-9 $appPID if [$? -eq 0]; Then echo "[Success]" echo "[Xuan Yu] ======================================================================================================================================================" else echo "[Failed]" echo "[Xuan Yu] ============================================================        ========================================================================================== "Fi GetAppPID If [$appPID-ne 0]; Then shutdown fi else echo "[Xuan Yu] $APP _path is not running" echo "[Xuan Yu] ================= =============================================================================================================== ====================== "Fi}deploy () {CD $APP _path/webapps/rm-rf $APP _name rm-rf $APP _name.war CP $APP _PA th/$APP _code/$APP _wars/*.war $APP _name.war CD $APP _path/logs/rm-rf * CD $APP _path rm-rf $APP _code}startup () {CD $APP _path/bin./startup.sh tail-100f. /logs/catalina.out}downloadandcompilesourcecodeshutdowndeploystartup

Automatically download source code _ and Compile _ package _ deployment _ Shell script to restart the service

Related Article

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.