LingxinMeng 7 mesiacov pred
rodič
commit
3b45930a90

+ 2 - 0
simulation-oauth-client/remove.sh

@@ -0,0 +1,2 @@
+#!/bin/bash
+rm -rf ./LOG_HOME_IS_UNDEFINED/ ./nohup.out

+ 2 - 0
simulation-oauth-client/start-center.sh

@@ -0,0 +1,2 @@
+#!/bin/bash
+nohup java -jar -Xms256m -Xmx256m simulation-oauth-client-1.0.jar --spring.profiles.active=center &

+ 11 - 0
simulation-oauth-client/stop.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+
+PID=$(pgrep -f simulation-oauth-client-1.0.jar)
+
+# 检查是否找到了 PID
+if [ -z "$PID" ]; then
+    echo "------- 服务已停止,无需重复执行脚本 -------"
+else
+    echo "------- 杀死指定进程: $PID -------"
+    kill "$PID"
+fi

+ 0 - 2
simulation-oauth-server/stop.sh

@@ -1,7 +1,5 @@
 #!/bin/bash
 
-# 获取运行 simulation-oauth-server-1.0.jar 的 Java 进程的 PID
-#PID=$(ps -ef | grep simulation-oauth-server-1.0.jar | grep java | awk '{ print $2 }')
 PID=$(pgrep -f simulation-oauth-server-1.0.jar)
 
 # 检查是否找到了 PID

+ 2 - 0
simulation-resource-common/remove.sh

@@ -0,0 +1,2 @@
+#!/bin/bash
+rm -rf ./LOG_HOME_IS_UNDEFINED/ ./nohup.out

+ 2 - 0
simulation-resource-common/start-center.sh

@@ -0,0 +1,2 @@
+#!/bin/bash
+nohup java -jar -Xms256m -Xmx256m simulation-resource-common-1.0.jar --spring.profiles.active=center &

+ 11 - 0
simulation-resource-common/stop.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+
+PID=$(pgrep -f simulation-resource-common-1.0.jar)
+
+# 检查是否找到了 PID
+if [ -z "$PID" ]; then
+    echo "------- 服务已停止,无需重复执行脚本 -------"
+else
+    echo "------- 杀死指定进程: $PID -------"
+    kill "$PID"
+fi

+ 2 - 0
simulation-resource-monitor/remove.sh

@@ -0,0 +1,2 @@
+#!/bin/bash
+rm -rf ./LOG_HOME_IS_UNDEFINED/ ./nohup.out

+ 2 - 0
simulation-resource-monitor/start-center.sh

@@ -0,0 +1,2 @@
+#!/bin/bash
+nohup java -jar -Xms256m -Xmx256m simulation-resource-monitor-1.0.jar --spring.profiles.active=center &

+ 11 - 0
simulation-resource-monitor/stop.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+
+PID=$(pgrep -f simulation-resource-monitor-1.0.jar)
+
+# 检查是否找到了 PID
+if [ -z "$PID" ]; then
+    echo "------- 服务已停止,无需重复执行脚本 -------"
+else
+    echo "------- 杀死指定进程: $PID -------"
+    kill "$PID"
+fi

+ 2 - 0
simulation-resource-scene/remove.sh

@@ -0,0 +1,2 @@
+#!/bin/bash
+rm -rf ./LOG_HOME_IS_UNDEFINED/ ./nohup.out

+ 2 - 0
simulation-resource-scene/start-center.sh

@@ -0,0 +1,2 @@
+#!/bin/bash
+nohup java -jar -Xms256m -Xmx256m simulation-resource-scene-1.0.jar --spring.profiles.active=center &

+ 11 - 0
simulation-resource-scene/stop.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+
+PID=$(pgrep -f simulation-resource-scene-1.0.jar)
+
+# 检查是否找到了 PID
+if [ -z "$PID" ]; then
+    echo "------- 服务已停止,无需重复执行脚本 -------"
+else
+    echo "------- 杀死指定进程: $PID -------"
+    kill "$PID"
+fi

+ 2 - 0
simulation-resource-server/remove.sh

@@ -0,0 +1,2 @@
+#!/bin/bash
+rm -rf ./LOG_HOME_IS_UNDEFINED/ ./nohup.out

+ 2 - 0
simulation-resource-server/start-center.sh

@@ -0,0 +1,2 @@
+#!/bin/bash
+nohup java -jar -Xms256m -Xmx256m simulation-resource-server-1.0.jar --spring.profiles.active=center &

+ 11 - 0
simulation-resource-server/stop.sh

@@ -0,0 +1,11 @@
+#!/bin/bash
+
+PID=$(pgrep -f simulation-resource-server-1.0.jar)
+
+# 检查是否找到了 PID
+if [ -z "$PID" ]; then
+    echo "------- 服务已停止,无需重复执行脚本 -------"
+else
+    echo "------- 杀死指定进程: $PID -------"
+    kill "$PID"
+fi