ADD:bin/start-https.sh
Showing
1 changed file
with
37 additions
and
0 deletions
bin/start-https.sh
0 → 100755
1 | +#conf | ||
2 | +cp src/main/resources/application.properties.online.https src/main/resources/application.properties | ||
3 | +cp src/main/resources/public/index.html.online.https src/main/resources/public/index.html | ||
4 | + | ||
5 | +#path | ||
6 | +project_path=$(cd `dirname $0`; cd ..; pwd) | ||
7 | +log_path=${project_path}/log | ||
8 | +pid_file=${project_path}/bin/pid | ||
9 | +echo "INFO: project_path=${project_path}" | ||
10 | +echo "INFO: log_path=${log_path}" | ||
11 | +echo "INFO: pid_file=${pid_file}" | ||
12 | + | ||
13 | +#mkdir log | ||
14 | +if [ -d ${log_path} ];then | ||
15 | + echo "INFO: log/ exit" | ||
16 | +else | ||
17 | + echo "INFO: log/ not exit,create path log/" | ||
18 | + mkdir ${log_path} | ||
19 | +fi | ||
20 | + | ||
21 | +# Check pid file | ||
22 | +if [[ -f $pid_file ]]; then | ||
23 | + echo "Error: Service may be already started. Check the status first."; | ||
24 | + exit 1; | ||
25 | +fi | ||
26 | + | ||
27 | +# start | ||
28 | +nohup mvn spring-boot:run >${log_path}/xkl.out & | ||
29 | + | ||
30 | +# write down the pid | ||
31 | +pid=$!; | ||
32 | +if [[ -z $pid ]]; then | ||
33 | + echo "Error: cannot start the service." | ||
34 | + exit 1 | ||
35 | +fi | ||
36 | +echo ${pid} > ${pid_file} | ||
37 | +echo "INFO: start newstat service" |
-
Please register or login to post a comment