Jelajahi Sumber

:bug: 启动脚本

Aron 6 tahun lalu
induk
melakukan
5dd5575a10
2 mengubah file dengan 12 tambahan dan 1 penghapusan
  1. 4 1
      bin/shutdown.sh
  2. 8 0
      bin/startup.sh

+ 4 - 1
bin/shutdown.sh

@@ -1,5 +1,8 @@
 #!/bin/bash
 
 jarName=$1
-echo " ---  "
+if [ -z "${jarName}" ]
+then
+    jarName=ifast-1.0.0.jar
+fi
 ps -ef | grep ${jarName} | grep -v grep | grep -v deploy | awk '{print $2}' | xargs kill -9

+ 8 - 0
bin/startup.sh

@@ -1,6 +1,14 @@
 #!/bin/bash
 
 jarName=$1
+if [ -z "${jarName}" ]
+then
+    jarName=ifast-1.0.0.jar
+fi
 profile=$2
+if [ -z "${profile}" ]
+then
+    profile=dev
+fi
 
 nohup java -jar ../${jarName} --spring.profiles.active=${profile} >/dev/null 2>&1 &