Spring boot CentOS deployment start Stop script

Source: Internet
Author: User
Tags stop script

Original address: http://www.cnblogs.com/skyblog/p/7243979.html

Using the script to start and shut down the service, the script startup and shutdown under CentOS can be as follows:

start () { now=`Date "+%y%m%d%h%m%s"' EXEC Java-xms64m-xmx256m-jar./simple-service-0.0.1. Jar--server.port=7085--config.name=pro > Logs/simple-service.log &} #停止方法 Stop () {PSAux|grepsimple-service|grep 7085|grep-Vgrep|awk '{print $}'| whileRead PID Do     Kill-9$pid Done}     Case " $" inchstart) Start;   stop) stop;; restart) stop start;; *) printf'Usage:%s {start|stop|restart}\n' "$testg"Exit1 ;; Esac

Start mode:sh simple-service.jar start of course you can start all of the services in the script, or you can use the automatic deployment mechanism to automatically deploy auto-start.

Spring boot CentOS deployment start Stop script

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.