summaryrefslogtreecommitdiffstats
path: root/wso2/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin
diff options
context:
space:
mode:
authorZhaoxing <meng.zhaoxing1@zte.com.cn>2017-08-08 14:02:53 +0800
committerZhaoxing <meng.zhaoxing1@zte.com.cn>2017-08-08 14:02:53 +0800
commitc0604184b2aa8cff924ca783ec6b36f1f5988775 (patch)
tree1c70ffe1ad90c915b3382a37eb2fa80901519c7b /wso2/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin
parent706fc9fed496972968fde136c3e4e10f9578a5b3 (diff)
init code
Change-Id: Icd0948118397b256da70dfbcbbec5520dc5eafd4 Signed-off-by: Zhaoxing <meng.zhaoxing1@zte.com.cn>
Diffstat (limited to 'wso2/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin')
-rw-r--r--wso2/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/find_kill_process.bat23
-rw-r--r--wso2/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/shutdown.bat34
-rw-r--r--wso2/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/shutdown.sh44
3 files changed, 101 insertions, 0 deletions
diff --git a/wso2/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/find_kill_process.bat b/wso2/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/find_kill_process.bat
new file mode 100644
index 0000000..d89cf27
--- /dev/null
+++ b/wso2/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/find_kill_process.bat
@@ -0,0 +1,23 @@
+@REM
+@REM Copyright (C) 2015 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 >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/wso2/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/shutdown.bat b/wso2/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/shutdown.bat
new file mode 100644
index 0000000..d932cb7
--- /dev/null
+++ b/wso2/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/shutdown.bat
@@ -0,0 +1,34 @@
+@REM
+@REM Copyright (C) 2015 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 WSO2
+
+set HOME=%~dp0
+set Main_Class="org.wso2.carbon.bootstrap.Bootstrap"
+
+echo ================== WSO2 info =============================================
+echo HOME=$HOME
+echo Main_Class=%Main_Class%
+echo ===============================================================================
+
+echo ### Stopping WSO2
+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" %Main_Class%
+)
+exit
diff --git a/wso2/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/shutdown.sh b/wso2/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/shutdown.sh
new file mode 100644
index 0000000..06a0950
--- /dev/null
+++ b/wso2/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/shutdown.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+#
+# Copyright (C) 2015 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`
+Main_Class="org.wso2.carbon.bootstrap.Bootstrap"
+
+echo ================== umc-service info =============================================
+echo HOME=$HOME
+echo Main_Class=$Main_Class
+echo ===============================================================================
+cd $HOME; pwd
+
+echo @WORK_DIR@ $HOME
+
+function save_service_pid(){
+ service_pid=`ps -ef | grep $Main_Class | grep -v grep | awk '{print $2}'`
+ echo @service_pid@ $service_pid
+}
+
+function kill_service_process(){
+ ps -p $service_pid
+ if [ $? == 0 ]; then
+ kill -9 $service_pid
+ fi
+}
+
+save_service_pid;
+echo @C_CMD@ kill -9 $service_pid
+kill_service_process; \ No newline at end of file