2 Commits 4e0171c598 ... c9790b98ee

Autore SHA1 Messaggio Data
  sensordb2 c9790b98ee Merge branch 'dev' of http://47.101.131.235:3000/FutureYu/BlackBoxSystem into dev 1 anno fa
  sensordb2 f1ced8fe0f 增加恢复出厂状态的脚本 1 anno fa

+ 5 - 0
shell/clearData.sh

@@ -0,0 +1,5 @@
+#!/bin/bash
+ROOT=$(cd `dirname $0`/../; pwd)
+cp -rf $ROOT/init/meta.db $ROOT/
+rm -rf $ROOT/data/*
+echo "finish"

+ 0 - 0
shell/forceStopAll.sh


+ 5 - 2
shell/insert/insert.sh

@@ -3,14 +3,14 @@
 ROOT=$(cd `dirname $0`/../../; pwd)
 cd $ROOT
 APP_NAME=blackbox-insert
-# JAVA_HOME=$ROOT/jdk8
+JAVA_HOME=$ROOT/jdk8
 JAR_NAME=$ROOT/lib/insert-app-0.0.1-SNAPSHOT.jar
 #PID  代表是PID文件
 PID=$ROOT/pid/$APP_NAME\.pid
 
 
 usage() {
-    echo "Usage: sh 执行脚本.sh [start|stop|restart|status]"
+    echo "Usage: sh 执行脚本.sh [start|stop|restart|status|force_stop]"
     exit 1
 }
 
@@ -108,6 +108,9 @@ case "$1" in
   "restart")
     restart
     ;;
+  "force_stop")
+    restart
+    ;;
   *)
     usage
     ;;

+ 5 - 2
shell/query/query.sh

@@ -3,14 +3,14 @@
 ROOT=$(cd `dirname $0`/../../; pwd)
 cd $ROOT
 APP_NAME=blackbox-query
-# JAVA_HOME=$ROOT/jdk8
+JAVA_HOME=$ROOT/jdk8
 JAR_NAME=$ROOT/lib/query-app-0.0.1-SNAPSHOT.jar
 #PID  代表是PID文件
 PID=$ROOT/pid/$APP_NAME\.pid
 
 
 usage() {
-    echo "Usage: sh 执行脚本.sh [start|stop|restart|status]"
+    echo "Usage: sh 执行脚本.sh [start|stop|restart|status|force_stop]"
     exit 1
 }
 
@@ -108,6 +108,9 @@ case "$1" in
   "restart")
     restart
     ;;
+  "force_stop")
+    force_stop
+    ;;
   *)
     usage
     ;;

+ 5 - 0
shell/stopAllAndCleanData.sh

@@ -0,0 +1,5 @@
+#!/bin/bash
+ROOT=$(cd `dirname $0`/../; pwd)
+$ROOT/shell/stopAll.sh
+$ROOT/shell/clearData.sh
+echo "finish"