You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#To run shell scripts on Ubuntu, you need to disable dash,sudo dpkg-reconfigure dash
4
4
5
5
# doc:
6
-
# EN:Server deployment script, this script encapsulates common deployment operations, not necessarily used
7
-
# CN:服务器部署脚本,这个脚本封装了常用部署操作,不是一定要使用的
6
+
# Server deployment script, this script encapsulates common deployment operations, not necessarily used
8
7
9
-
# EN:The deploy.sh script includes, start the server, gracefully stop the server, update the program file, restart the server, corresponding to four commands
# The deploy.sh script includes, start the server, gracefully stop the server, update the program file, restart the server, corresponding to four commands
# sh deploy.sh start /usr/local/tank/single-boot/single-boot-1.0.jar
15
13
16
-
# EN:start starts the server, the absolute path is very important,[/usr/local/tank/single-boot/single-boot-1.0.jar] is the absolute path of the jar package,
# start starts the server, the absolute path is very important,[/usr/local/tank/single-boot/single-boot-1.0.jar] is the absolute path of the jar package,
#EN:stop closes the server, use command jps | grep single,grab the java process that needs to be closed, so you don't need to enter the full name of single-boot
20
+
# stop closes the server, use command jps | grep single,grab the java process that needs to be closed, so you don't need to enter the full name of single-boot
25
21
# If you have two launchers named [single-boot1.jar], [single-boot2], both will be turned off
@@ -84,103 +67,56 @@ function waitAllProcessesExit() {
84
67
sleep 3
85
68
else
86
69
echo"Gracefully shut down ${1} processes"
87
-
return
70
+
break
88
71
fi
89
72
done
90
73
}
91
74
92
-
functionwaitLogFile() {
93
-
locallogfile
75
+
waitLogFile() {
76
+
localcurrentPath=$(pwd)
94
77
whiletrue;do
95
-
logfile=$(ls ./ | grep ${LOG_FILE})
96
-
if [ -z"${logfile}" ];then
97
-
echo"Waiting for ${LOG_FILE} to be created..."
98
-
sleep 1
99
-
else
100
-
return
101
-
fi
102
-
103
-
if [ -z"${logfile}" ];then
104
-
echo"Waiting for ${LOG_FILE} to be created..."
105
-
sleep 2
106
-
else
107
-
return
108
-
fi
109
-
110
-
if [ -z"${logfile}" ];then
111
-
echo"Waiting for ${LOG_FILE} to be created..."
112
-
sleep 3
113
-
else
114
-
return
115
-
fi
116
-
117
-
if [ -z"${logfile}" ];then
118
-
echo"If there is no response for a long time, solution 1: Please check the startup log, or whether there is a generated log file in the running directory"
119
-
echo"如果长时间无响应,解决方法1:请检测启动log日志,或者运行目录是否有生成的日志文件"
120
-
sleep 1
121
-
else
122
-
return
123
-
fi
124
-
125
-
if [ -z"${logfile}" ];then
126
-
echo"If there is no response for a long time, solution 2: Confirm whether the jvm parameter -Dspring.profiles.active=pro is correct and whether it is the operating environment configuration you expect"
echo"If there is no response for a long time, solution 4: Run the main function in Idea, add the -Dspring.profiles.active=pro parameter, it can run in Idea and it must also run on the server"
0 commit comments