diff options
author | HuabingZhao <zhao.huabing@zte.com.cn> | 2016-08-17 12:37:07 +0800 |
---|---|---|
committer | HuabingZhao <zhao.huabing@zte.com.cn> | 2016-08-17 14:03:37 +0800 |
commit | 4143173cd08ef515173e5ad4b4c15d4e9f9f1943 (patch) | |
tree | 0aa7a7ae64ce9876b95628cb5835ff5e12c8a546 /apiroute/apiroute-standalone/src/assembly | |
parent | 230628860edf5ff489dd59e299d35c80d1329a5d (diff) |
1. Adjust the directory hierarchy
2. Fix the compile issue
Change-Id: Ibf10c83104e5e673bc797013799861426cd950ce
Signed-off-by: HuabingZhao <zhao.huabing@zte.com.cn>
Diffstat (limited to 'apiroute/apiroute-standalone/src/assembly')
15 files changed, 0 insertions, 379 deletions
diff --git a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/apirouteService.exe b/apiroute/apiroute-standalone/src/assembly/resource/apiroute/apirouteService.exe Binary files differdeleted file mode 100644 index c6e8fc2..0000000 --- a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/apirouteService.exe +++ /dev/null diff --git a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/apirouteService.xml b/apiroute/apiroute-standalone/src/assembly/resource/apiroute/apirouteService.xml deleted file mode 100644 index f885a95..0000000 --- a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/apirouteService.xml +++ /dev/null @@ -1,13 +0,0 @@ -<service>
- <id>msb_apiroute</id>
- <name>msb_apiroute</name>
- <description>This service runs apiroute.</description>
- <workingdirectory>%BASE%</workingdirectory>
- <env name="JAVA_HOME" value="c:\jdk"/>
- <env name="RUNHOME" value="%BASE%"/>
- <executable>java</executable>
- <arguments>-jar "apiroute-service.jar" server "conf/apiroute.yml"</arguments>
- <stopexecutable>stop.bat</stopexecutable>
- <logmode>rotate</logmode>
- <!-- stopparentprocessfirst>true</stopparentprocessfirst -->
-</service>
\ No newline at end of file diff --git a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/conf/apiroute.yml b/apiroute/apiroute-standalone/src/assembly/resource/apiroute/conf/apiroute.yml deleted file mode 100644 index 172fae3..0000000 --- a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/conf/apiroute.yml +++ /dev/null @@ -1,52 +0,0 @@ -defaultWorkspace: ../apiroute-works
-
-defaultName: ${DW_DEFAULT_NAME:-Stranger}
-
-propertiesName: redis.properties
-propertiesDir: conf
-
-# use the discover config if you want to monitor a discover service and register microservices change
-discoverInfo:
- ip: 127.0.0.1
- port: 10081
- enabled: false
-
-consulInfo:
- ip: 127.0.0.1
- port: 8500
-
-# use the simple server factory if you only want to run on a single port
-server:
- type: simple
- rootPath: '/api/microservices/v1/*'
- applicationContextPath: /
- adminContextPath: /admin
- connector:
- type: http
- port: 8086
-
-# Logging settings.
-logging:
-
- # The default level of all loggers. Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL.
- level: ALL
-
- # Logger-specific levels.
- loggers:
-
- # Sets the level for 'com.example.app' to DEBUG.
- com.example: DEBUG
-
- appenders:
- - type: console
- threshold: INFO
- timeZone: UTC
- logFormat: "%-6level [%d{HH:mm:ss.SSS}] [%t] %logger{5} - %X{code} %msg %n"
- - type: file
- threshold: INFO
- logFormat: "%-6level [%d{HH:mm:ss.SSS}] [%t] %logger{5} - %X{code} %msg %n"
- currentLogFilename: ../apiroute-works/logs/application.log
- archivedLogFilenamePattern: ../apiroute-works/logs/application-%d{yyyy-MM-dd}-%i.log.gz
- archivedFileCount: 7
- timeZone: UTC
-
diff --git a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initServices/msb.json b/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initServices/msb.json deleted file mode 100644 index e493556..0000000 --- a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initServices/msb.json +++ /dev/null @@ -1,29 +0,0 @@ -[{
- "serviceName" : "microservices",
- "version" : "v1",
- "url" : "/api/microservices/v1",
- "apiJson" : "/api/microservices/v1/swagger.json",
- "apiJsonType" : "1",
- "metricsUrl" : "/admin/metrics",
- "control" : "1",
- "status" : "1",
- "servers" : [{
- "ip" : "127.0.0.1",
- "port" : "8086",
- "weight" : 0
- }
- ]
- },
-{
- "serviceName" : "microservices",
- "url" : "/iui/microservices",
- "control" : "1",
- "status" : "1",
- "servers" : [{
- "ip" : "127.0.0.1",
- "port" : "8086",
- "weight" : 0
- }
- ]
- }
-]
diff --git a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initServices/readme.txt b/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initServices/readme.txt deleted file mode 100644 index 59ef5e4..0000000 --- a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initServices/readme.txt +++ /dev/null @@ -1,63 +0,0 @@ -########################## initialize default routeInfo to redis ##########################
-
-#when msb is starting, it will automatically read all json files under this folder, and initializes to redis.
-#If the routeInfo is exist, it will be ignored, otherwise it will be saved.
-
-
-# JSON File content must be routeInfo format array like below examples:
-
-# optional:
-# apiJsonType: 1:user-defined json type 0:pre-defined json type
-# control: 0:default 1:readonly 2:hidden
-# status: 0:disabled 1:enabled
-# Tip£ºcontrol¡¢status¡¢weight are non-mandatory
-
-[
-##########################apiRoute example##########################
-
-{
- "serviceName" : "microservices",
- "version" : "v1",
- "url" : "/api/microservices/v1",
- "apiJson" : "/api/microservices/v1/swagger.json",
- "apiJsonType" : "1",
- "metricsUrl" : "/admin/metrics",
- "control" : "1",
- "status" : "1",
- "servers" : [{
- "ip" : "127.0.0.1",
- "port" : "8086",
- "weight" : 0
- }
- ]
- },
-
-##########################iuiRoute example##########################
-
-{
- "serviceName" : "microservices",
- "url" : "/iui/microservices",
- "control" : "1",
- "status" : "1",
- "servers" : [{
- "ip" : "127.0.0.1",
- "port" : "8086",
- "weight" : 0
- }
- ]
- },
-
-##########################customRoute example##########################
- {
- "serviceName" : "/test",
- "url" : "/test",
- "control" : "0",
- "status" : "1",
- "servers" : [{
- "ip" : "10.74.56.36",
- "port" : "8989",
- "weight" : 0
- }
- ]
- }
-]
\ No newline at end of file diff --git a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initSwaggerJson/api-doc1.json b/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initSwaggerJson/api-doc1.json deleted file mode 100644 index 7c63d7e..0000000 --- a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initSwaggerJson/api-doc1.json +++ /dev/null @@ -1 +0,0 @@ -{"swagger":"2.0","info":{"version":"1.0.0","title":"Local API Test"},"basePath":"/service","tags":[{"name":"ApiRoute"}],"paths":{"/apiRoute":{"get":{"tags":["ApiRoute"],"summary":"get all ApiRoute ","description":"","operationId":"getApiRoutes","produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/ApiRouteInfo"}}}}},"post":{"tags":["ApiRoute"],"summary":"add one ApiRoute ","description":"","operationId":"addApiRoute","produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"ApiRoute Instance Info","required":true,"schema":{"$ref":"#/definitions/ApiRouteInfo"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiRouteInfo"}},"500":{"description":"add ApiRoute error "}}}},"/apiRoute/type/{type}/{routeName}/version/{version}":{"get":{"tags":["ApiRoute"],"summary":"get one ApiRoute ","description":"","operationId":"getApiRoute","produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"Route type","required":true,"type":"string","enum":["iui","api"]},{"name":"routeName","in":"path","description":"ApiRoute routeName","required":true,"type":"string"},{"name":"version","in":"path","description":"ApiRoute version","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiRouteInfo"}},"500":{"description":"get ApiRoute error "}}},"delete":{"tags":["ApiRoute"],"summary":"delete one ApiRoute by routeName and version","description":"","operationId":"deleteApiRoute","produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"Route type","required":true,"type":"string","enum":["iui","api"]},{"name":"routeName","in":"path","description":"ApiRoute routeName","required":true,"type":"string"},{"name":"version","in":"path","description":"ApiRoute version","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiRouteResult"}},"500":{"description":"delete ApiRoute error "}}}},"/apiRoute/{routeName}/version/{version}":{"put":{"tags":["ApiRoute"],"summary":"update one ApiRoute by routeName and version","description":"","operationId":"updateApiRoute","produces":["application/json"],"parameters":[{"name":"routeName","in":"path","description":"ApiRoute routeName","required":true,"type":"string"},{"name":"version","in":"path","description":"ApiRoute version","required":true,"type":"string"},{"in":"body","name":"body","description":"ApiRoute Instance Info","required":true,"schema":{"$ref":"#/definitions/ApiRouteInfo"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiRouteResult"}},"500":{"description":"update ApiRoute error "}}}}},"definitions":{"ApiRouteLifeCycle":{"type":"object","properties":{"installPath":{"type":"string"},"startScript":{"type":"string"},"stopScript":{"type":"string"}}},"ApiRouteServer":{"type":"object","properties":{"ip":{"type":"string"},"weight":{"type":"integer","format":"int32"}}},"ApiRouteResult":{"type":"object","properties":{"result":{"type":"string"},"info":{"type":"string"}}},"ApiRouteInfo":{"type":"object","properties":{"routeName":{"type":"string"},"version":{"type":"string"},"url":{"type":"string"},"apiJson":{"type":"string"},"type":{"type":"string"},"servers":{"type":"array","items":{"$ref":"#/definitions/ApiRouteServer"}},"lifeCycle":{"$ref":"#/definitions/ApiRouteLifeCycle"}}}}}
\ No newline at end of file diff --git a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initSwaggerJson/api-doc2.json b/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initSwaggerJson/api-doc2.json deleted file mode 100644 index eb7c8cd..0000000 --- a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initSwaggerJson/api-doc2.json +++ /dev/null @@ -1 +0,0 @@ -{"swagger":"2.0","info":{"version":"1.0.0","title":"Local API Test2"},"basePath":"/service","tags":[{"name":"ApiRoute"}],"paths":{"/apiRoute":{"get":{"tags":["ApiRoute"],"summary":"get all ApiRoute ","description":"","operationId":"getApiRoutes","produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/ApiRouteInfo"}}}}},"post":{"tags":["ApiRoute"],"summary":"add one ApiRoute ","description":"","operationId":"addApiRoute","produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"ApiRoute Instance Info","required":true,"schema":{"$ref":"#/definitions/ApiRouteInfo"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiRouteInfo"}},"500":{"description":"add ApiRoute error "}}}},"/apiRoute/type/{type}/{routeName}/version/{version}":{"get":{"tags":["ApiRoute"],"summary":"get one ApiRoute ","description":"","operationId":"getApiRoute","produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"Route type","required":true,"type":"string","enum":["iui","api"]},{"name":"routeName","in":"path","description":"ApiRoute routeName","required":true,"type":"string"},{"name":"version","in":"path","description":"ApiRoute version","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiRouteInfo"}},"500":{"description":"get ApiRoute error "}}},"delete":{"tags":["ApiRoute"],"summary":"delete one ApiRoute by routeName and version","description":"","operationId":"deleteApiRoute","produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"Route type","required":true,"type":"string","enum":["iui","api"]},{"name":"routeName","in":"path","description":"ApiRoute routeName","required":true,"type":"string"},{"name":"version","in":"path","description":"ApiRoute version","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiRouteResult"}},"500":{"description":"delete ApiRoute error "}}}},"/apiRoute/{routeName}/version/{version}":{"put":{"tags":["ApiRoute"],"summary":"update one ApiRoute by routeName and version","description":"","operationId":"updateApiRoute","produces":["application/json"],"parameters":[{"name":"routeName","in":"path","description":"ApiRoute routeName","required":true,"type":"string"},{"name":"version","in":"path","description":"ApiRoute version","required":true,"type":"string"},{"in":"body","name":"body","description":"ApiRoute Instance Info","required":true,"schema":{"$ref":"#/definitions/ApiRouteInfo"}}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/ApiRouteResult"}},"500":{"description":"update ApiRoute error "}}}}},"definitions":{"ApiRouteLifeCycle":{"type":"object","properties":{"installPath":{"type":"string"},"startScript":{"type":"string"},"stopScript":{"type":"string"}}},"ApiRouteServer":{"type":"object","properties":{"ip":{"type":"string"},"weight":{"type":"integer","format":"int32"}}},"ApiRouteResult":{"type":"object","properties":{"result":{"type":"string"},"info":{"type":"string"}}},"ApiRouteInfo":{"type":"object","properties":{"routeName":{"type":"string"},"version":{"type":"string"},"url":{"type":"string"},"apiJson":{"type":"string"},"type":{"type":"string"},"servers":{"type":"array","items":{"$ref":"#/definitions/ApiRouteServer"}},"lifeCycle":{"$ref":"#/definitions/ApiRouteLifeCycle"}}}}}
\ No newline at end of file diff --git a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initUrlRootPath/initUrlRootPath.json b/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initUrlRootPath/initUrlRootPath.json deleted file mode 100644 index 9668592..0000000 --- a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initUrlRootPath/initUrlRootPath.json +++ /dev/null @@ -1,4 +0,0 @@ -{
- "iuiRootPath" : "iui",
- "apiRootPath" : "api"
-}
diff --git a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initVisualRange/initVisualRangeMatches.json b/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initVisualRange/initVisualRangeMatches.json deleted file mode 100644 index 82ff10d..0000000 --- a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initVisualRange/initVisualRangeMatches.json +++ /dev/null @@ -1,3 +0,0 @@ -{
- "visualRange" : "0,1"
-}
diff --git a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initVisualRange/readme.txt b/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initVisualRange/readme.txt deleted file mode 100644 index 2fe9f72..0000000 --- a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/ext/initVisualRange/readme.txt +++ /dev/null @@ -1,14 +0,0 @@ -########################## initialize default visualRange Matches from msdiscover to redis ##########################
-
-
-visualRange:·þÎñµÄ¿É¼û·¶Î§ ϵͳ¼ä:0 ϵͳÄÚ:1
-
-#when msb is starting, it will automatically read this json file named "initVisualRangeMatches.json"
-
-#when msdiscover will sysn datas to apiGateway,only visualRange Matches will be save to redis.
-
-
-
-# JSON File content must be format array like below examples:
-
-0 or 1 or 0,1
\ No newline at end of file diff --git a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/find_kill_process.bat b/apiroute/apiroute-standalone/src/assembly/resource/apiroute/find_kill_process.bat deleted file mode 100644 index 1b3b76b..0000000 --- a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/find_kill_process.bat +++ /dev/null @@ -1,23 +0,0 @@ -@REM
-@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
-@REM
-@REM Licensed under the Apache License, Version 2.0 (the "License");
-@REM you may not use this file except in compliance with the License.
-@REM You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing, software
-@REM distributed under the License is distributed on an "AS IS" BASIS,
-@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@REM See the License for the specific language governing permissions and
-@REM limitations under the License.
-@REM
-echo %1 | findstr %2 | findstr %3>NUL
-echo ERRORLEVEL=%ERRORLEVEL%
-IF ERRORLEVEL 1 goto findend
-for /f "tokens=1" %%a in (%1) do (
- echo kill %1
- taskkill /F /pid %%a
-)
-:findend
\ No newline at end of file diff --git a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/run.bat b/apiroute/apiroute-standalone/src/assembly/resource/apiroute/run.bat deleted file mode 100644 index 6e2362a..0000000 --- a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/run.bat +++ /dev/null @@ -1,55 +0,0 @@ -@REM -@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) -@REM -@REM Licensed under the Apache License, Version 2.0 (the "License"); -@REM you may not use this file except in compliance with the License. -@REM You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, software -@REM distributed under the License is distributed on an "AS IS" BASIS, -@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@REM See the License for the specific language governing permissions and -@REM limitations under the License. -@REM -@echo off -title apiroute-service - -set RUNHOME=%~dp0 -echo ### RUNHOME: %RUNHOME% - -echo ### Starting apiroute-service -rem cd /d %RUNHOME% - -rem set JAVA_HOME=D:\JDK1.7\jdk\jdk\windows -set JAVA="%JAVA_HOME%\bin\java.exe" -set port=8777 - -setlocal enabledelayedexpansion -set index=1 -FOR /F "tokens=3 delims= " %%a in ('"%JAVA% -version 2>&1"')do ( - if !index! equ 1 set JAVA_VERSION=%%a - set /a index=index+1 -) -set JAVA_VERSION=%JAVA_VERSION:~1,3% -if "%JAVA_VERSION%"=="1.8" ( - set jvm_opts=-Xms16m -Xmx128m -XX:+UseSerialGC -XX:MaxMetaspaceSize=64m -XX:NewRatio=2 -) else ( - set jvm_opts=-Xms16m -Xmx128m -XX:+UseSerialGC -XX:MaxPermSize=64m -XX:NewRatio=2 -) - -set jvm_opts=%jvm_opts% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=%port%,server=y,suspend=n -set class_path=%RUNHOME%;%RUNHOME%apiroute-service.jar -echo ### jvm_opts: %jvm_opts% -echo ### class_path: %class_path% - -%JAVA% -classpath %class_path% %jvm_opts% org.openo.msb.ApiRouteApp server %RUNHOME%conf/apiroute.yml - -IF ERRORLEVEL 1 goto showerror -exit -:showerror -echo WARNING: Error occurred during startup or Server abnormally stopped by way of killing the process,Please check! -echo After checking, press any key to close -pause -exit
\ No newline at end of file diff --git a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/run.sh b/apiroute/apiroute-standalone/src/assembly/resource/apiroute/run.sh deleted file mode 100644 index bd62668..0000000 --- a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/run.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -#JAVA_HOME="/home/conductortest/jdk1.7/jdk/linux" - -DIRNAME=`dirname $0` -RUNHOME=`cd $DIRNAME/; pwd` -echo @RUNHOME@ $RUNHOME - -#JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::") -echo @JAVA_HOME@ $JAVA_HOME -JAVA="$JAVA_HOME/bin/java" -echo @JAVA@ $JAVA -JAVA_VERSION=`$JAVA -version 2>&1 |awk 'NR==1{ sub(/"/,""); print substr($3,1,3)}'` -echo @JAVA_VERSION@ $JAVA_VERSION -if [ $JAVA_VERSION = "1.8" ] -then - JAVA_OPTS="-Xms16m -Xmx128m -XX:+UseSerialGC -XX:MaxMetaspaceSize=64m -XX:NewRatio=2" -else - JAVA_OPTS="-Xms16m -Xmx128m -XX:+UseSerialGC -XX:MaxPermSize=64m -XX:NewRatio=2" -fi -port=8779 -#JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=$port,server=y,suspend=n" -echo @JAVA_OPTS@ $JAVA_OPTS - -class_path="$RUNHOME/:$RUNHOME/apiroute-service.jar" -echo @class_path@ $class_path - -"$JAVA" $JAVA_OPTS -classpath "$class_path" org.openo.msb.ApiRouteApp server "$RUNHOME/conf/apiroute.yml" diff --git a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/stop.bat b/apiroute/apiroute-standalone/src/assembly/resource/apiroute/stop.bat deleted file mode 100644 index 96e96a8..0000000 --- a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/stop.bat +++ /dev/null @@ -1,34 +0,0 @@ -@REM -@REM Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) -@REM -@REM Licensed under the Apache License, Version 2.0 (the "License"); -@REM you may not use this file except in compliance with the License. -@REM You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, software -@REM distributed under the License is distributed on an "AS IS" BASIS, -@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@REM See the License for the specific language governing permissions and -@REM limitations under the License. -@REM -@echo off -title stopping apiroute-service - -set HOME=%~dp0 -set APIROUTE_Main_Class="org.openo.msb.ApiRouteApp" - -echo ================== apiroute info ============================================= -echo HOME=$HOME -echo APIROUTE_Main_Class=%APIROUTE_Main_Class% -echo =============================================================================== - -echo ### Stopping apiroute-service -cd /d %HOME% - -rem set JAVA_HOME=D:\WorkSoftware\jdk1.7.0_60 -for /f "delims=" %%i in ('%JAVA_HOME%\bin\jcmd') do ( - call find_kill_process "%%i" %APIROUTE_Main_Class% %HOME% -) -exit
\ No newline at end of file diff --git a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/stop.sh b/apiroute/apiroute-standalone/src/assembly/resource/apiroute/stop.sh deleted file mode 100644 index 6d48003..0000000 --- a/apiroute/apiroute-standalone/src/assembly/resource/apiroute/stop.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -DIRNAME=`dirname $0` -HOME=`cd $DIRNAME/; pwd` -APIROUTE_Main_Class="org.openo.msb.ApiRouteApp" - -echo ================== apiroute info ============================================= -echo HOME=$HOME -echo APIROUTE_Main_Class=$APIROUTE_Main_Class -echo =============================================================================== -cd $HOME; pwd - -echo @WORK_DIR@ $HOME - -function save_apiroute_pid(){ - apiroute_id=`ps -ef | grep $APIROUTE_Main_Class | grep $HOME | grep -v grep | awk '{print $2}'` - echo $apiroute_id -} - -function kill_apiroute_process(){ - ps -p $apiroute_id - if [ $? == 0 ]; then - kill -9 $apiroute_id - fi -} - -save_apiroute_pid; -echo @C_CMD@ kill -9 $apiroute_id -kill_apiroute_process;
\ No newline at end of file |