admin 9 лет назад
Родитель
Сommit
ff55b0ca23
2 измененных файлов с 52 добавлено и 0 удалено
  1. 26 0
      search-console/commands/control
  2. 26 0
      search-console/commands/control.test

+ 26 - 0
search-console/commands/control

@@ -0,0 +1,26 @@
+#!/bin/bash
+source /etc/profile
+
+base_dir="/mnt/mall-search"
+context_name="search-console"
+version="0.1.6"
+
+cd $base_dir
+wf=$context_name-$version.war
+
+function install() {
+    rm -rf $wf.bak
+    if [ -f $wf ]; then
+        mv -f $wf $wf.bak
+    fi
+    wget -q http://113.105.74.141:8081/artifactory/libs-release/com/uas/search/$context_name/$version/$context_name-$version.war
+}
+
+function run() {
+    ps -ef|grep $wf|grep java|awk '{print $2}'|xargs kill -9
+    nohup java -jar $wf 1>log.log 2>nohup.log &
+}
+
+install
+
+run

+ 26 - 0
search-console/commands/control.test

@@ -0,0 +1,26 @@
+#!/bin/bash
+source /etc/profile
+
+base_dir="/mnt/mall-search"
+context_name="search-console"
+version="0.1.6"
+
+cd $base_dir
+wf=$context_name-$version.war
+
+function install() {
+    rm -rf $wf.bak
+    if [ -f $wf ]; then
+        mv -f $wf $wf.bak
+    fi
+    wget -q http://113.105.74.141:8081/artifactory/libs-release/com/uas/search/$context_name/$version/$context_name-$version.war
+}
+
+function run() {
+    ps -ef|grep $wf|grep java|awk '{print $2}'|xargs kill -9
+    nohup java -Dspring.profiles.active=test -jar $wf 1>log.log 2>nohup.log &
+}
+
+install
+
+run