In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how Linux starts and stops restarting the springboot jar package". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how Linux starts and stops restarting the springboot jar package".
#! / bin/bash # can be replaced with your own execution program here, and other codes do not need to change the APP_NAME=mis-center-soa.jar # instructions to prompt the input parameter usage () {echo "Usage: sh my.sh [start | stop | restart | status]" exit 1} # check whether the program is running is_exist () {pid= `ps-ef | grep $APP_NAME | grep-v grep | awk'{print $2}'`# return 1 if it does not exist Return 0 if [- z "${pid}"] Then return 1 else return 0 fi} # Startup method start () {is_exist if [$?-eq "0]; then echo" ${APP_NAME} is already running. Pid=$ {pid}. " Else nohup java-jar / opt/app/spring-boot/mis-center-soa/$APP_NAME > / opt/logs/my.log 2 > & 1 & echo "${APP_NAME} start success" fi} # stop method stop () {is_exist if [$?-eq "0]; then kill-9$ pid else echo" ${APP_NAME} is not running "fi} # output running status status () {is_exist if [$?-eq" 0] Then echo "${APP_NAME} is running. Pid is ${pid} "else echo" ${APP_NAME} is NOT running. " Fi} # restart restart () {stop start} # according to the input parameters, select to execute the corresponding method. If you do not enter, execute the instructions case "$1" in "start") start;; "stop") stop;; "status") status;; "restart") restart;; *) usage;; esac
Thank you for reading, the above is the content of "how Linux starts and stops restarting springboot jar package". After the study of this article, I believe you have a deeper understanding of the problem of how Linux starts and stops restarting springboot jar package, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.