forked from community/product-iots
application-manager-new
parent
9e5d2a5018
commit
e2070bba4f
@ -1,78 +0,0 @@
|
|||||||
@echo off
|
|
||||||
|
|
||||||
REM ---------------------------------------------------------------------------
|
|
||||||
REM Copyright 2017 WSO2, Inc. http://www.wso2.org
|
|
||||||
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 ---------------------------------------------------------------------------
|
|
||||||
rem Main Script for WSO2 Carbon
|
|
||||||
rem
|
|
||||||
rem Environment Variable Prequisites
|
|
||||||
rem
|
|
||||||
rem CARBON_HOME Home of CARBON installation. If not set I will try
|
|
||||||
rem to figure it out.
|
|
||||||
rem
|
|
||||||
rem JAVA_HOME Must point at your Java Development Kit installation.
|
|
||||||
rem
|
|
||||||
rem JAVA_OPTS (Optional) Java runtime options used when the commands
|
|
||||||
rem is executed.
|
|
||||||
rem ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
rem --------- NOTE: This is an edited wso2server.sh script to facilitate
|
|
||||||
rem spark environment variables for WSO2DAS!
|
|
||||||
|
|
||||||
rem ----- if JAVA_HOME is not set we're not happy ------------------------------
|
|
||||||
:checkJava
|
|
||||||
|
|
||||||
if "%JAVA_HOME%" == "" goto noJavaHome
|
|
||||||
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
|
||||||
goto checkServer
|
|
||||||
|
|
||||||
:noJavaHome
|
|
||||||
echo "You must set the JAVA_HOME variable before running CARBON."
|
|
||||||
goto end
|
|
||||||
|
|
||||||
rem ----- Only set CARBON_HOME if not already set ----------------------------
|
|
||||||
:checkServer
|
|
||||||
rem %~sdp0 is expanded pathname of the current script under NT with spaces in the path removed
|
|
||||||
set CARBON_HOME=%~sdp0..
|
|
||||||
echo "%CARBON_HOME%\bin\version.txt"
|
|
||||||
SET curDrive=%cd:~0,1%
|
|
||||||
SET wsasDrive=%CARBON_HOME:~0,1%
|
|
||||||
if not "%curDrive%" == "%wsasDrive%" %wsasDrive%:
|
|
||||||
|
|
||||||
rem find CARBON_HOME if it does not exist due to either an invalid value passed
|
|
||||||
rem by the user or the %0 problem on Windows 9x
|
|
||||||
if not exist "%CARBON_HOME%\bin\version.txt" goto noServerHome
|
|
||||||
|
|
||||||
goto startServers
|
|
||||||
|
|
||||||
:noServerHome
|
|
||||||
echo CARBON_HOME is set incorrectly or CARBON could not be located. Please set CARBON_HOME.
|
|
||||||
echo %CARBON_HOME%
|
|
||||||
goto end
|
|
||||||
|
|
||||||
:startServers
|
|
||||||
start %CARBON_HOME%\wso2\broker\bin\wso2server.bat --run -Dprofile="broker-default"
|
|
||||||
timeout /T 10
|
|
||||||
start %CARBON_HOME%\bin\iot-server.bat --run
|
|
||||||
timeout /T 10
|
|
||||||
start %CARBON_HOME%\wso2\analytics\bin\wso2server.bat --run -Dprofile="analytics-default"
|
|
||||||
|
|
||||||
|
|
||||||
:end
|
|
||||||
goto endlocal
|
|
||||||
|
|
||||||
:endlocal
|
|
||||||
:END
|
|
@ -1,86 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#start-all.sh
|
|
||||||
# ----------------------------------------------------------------------------
|
|
||||||
# Copyright 2016 WSO2, Inc. http://www.wso2.org
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
cygwin=false;
|
|
||||||
darwin=false;
|
|
||||||
os400=false;
|
|
||||||
mingw=false;
|
|
||||||
case "`uname`" in
|
|
||||||
CYGWIN*) cygwin=true;;
|
|
||||||
MINGW*) mingw=true;;
|
|
||||||
OS400*) os400=true;;
|
|
||||||
Darwin*) darwin=true
|
|
||||||
if [ -z "$JAVA_VERSION" ] ; then
|
|
||||||
JAVA_VERSION="CurrentJDK"
|
|
||||||
else
|
|
||||||
echo "Using Java version: $JAVA_VERSION"
|
|
||||||
fi
|
|
||||||
if [ -z "$JAVA_HOME" ] ; then
|
|
||||||
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# resolve links - $0 may be a softlink
|
|
||||||
PRG="$0"
|
|
||||||
|
|
||||||
while [ -h "$PRG" ]; do
|
|
||||||
ls=`ls -ld "$PRG"`
|
|
||||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
|
||||||
if expr "$link" : '.*/.*' > /dev/null; then
|
|
||||||
PRG="$link"
|
|
||||||
else
|
|
||||||
PRG=`dirname "$PRG"`/"$link"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Get standard environment variables
|
|
||||||
PRGDIR=`dirname "$PRG"`
|
|
||||||
|
|
||||||
# Only set CARBON_HOME if not already set
|
|
||||||
[ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd`
|
|
||||||
|
|
||||||
###########################################################################
|
|
||||||
NAME=start-all
|
|
||||||
# Daemon name, where is the actual executable
|
|
||||||
IOT_INIT_SCRIPT="$CARBON_HOME/bin/iot-server.sh"
|
|
||||||
ANALYTICS_INIT_SCRIPT="$CARBON_HOME/wso2/analytics/bin/wso2server.sh"
|
|
||||||
BROKER_INIT_SCRIPT="$CARBON_HOME/wso2/broker/bin/wso2server.sh"
|
|
||||||
|
|
||||||
# If the daemon is not there, then exit.
|
|
||||||
|
|
||||||
if [ ! -z "$*" ]; then
|
|
||||||
exit;
|
|
||||||
else
|
|
||||||
trap "sh $CARBON_HOME/bin/stop-all.sh; exit;" INT TERM
|
|
||||||
fi
|
|
||||||
sh $BROKER_INIT_SCRIPT -Dprofile="broker-default" $* &
|
|
||||||
sleep 10
|
|
||||||
sh $IOT_INIT_SCRIPT $* &
|
|
||||||
sleep 10
|
|
||||||
sh $ANALYTICS_INIT_SCRIPT -Dprofile="analytics-default" $* &
|
|
||||||
|
|
||||||
|
|
||||||
if [ ! -z "$*" ]; then
|
|
||||||
exit;
|
|
||||||
else
|
|
||||||
trap "sh $CARBON_HOME/bin/stop-all.sh; exit;" INT TERM
|
|
||||||
while :
|
|
||||||
do
|
|
||||||
sleep 60
|
|
||||||
done
|
|
||||||
fi
|
|
@ -1,48 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#stop-all.sh
|
|
||||||
# ----------------------------------------------------------------------------
|
|
||||||
# Copyright 2016 WSO2, Inc. http://www.wso2.org
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
|
|
||||||
PRG="$0"
|
|
||||||
|
|
||||||
while [ -h "$PRG" ]; do
|
|
||||||
ls=`ls -ld "$PRG"`
|
|
||||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
|
||||||
if expr "$link" : '.*/.*' > /dev/null; then
|
|
||||||
PRG="$link"
|
|
||||||
else
|
|
||||||
PRG=`dirname "$PRG"`/"$link"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Get standard environment variables
|
|
||||||
PRGDIR=`dirname "$PRG"`
|
|
||||||
|
|
||||||
# Only set CARBON_HOME if not already set
|
|
||||||
[ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd`
|
|
||||||
|
|
||||||
###########################################################################
|
|
||||||
NAME=stop-all
|
|
||||||
# Daemon name, where is the actual executables
|
|
||||||
IOT_INIT_SCRIPT="$CARBON_HOME/bin/iot-server.sh"
|
|
||||||
ANALYTICS_INIT_SCRIPT="$CARBON_HOME/wso2/analytics/bin/wso2server.sh"
|
|
||||||
MB_INIT_SCRIPT="$CARBON_HOME/wso2/broker/bin/wso2server.sh"
|
|
||||||
|
|
||||||
sh $ANALYTICS_INIT_SCRIPT stop
|
|
||||||
sh $IOT_INIT_SCRIPT stop
|
|
||||||
sh $MB_INIT_SCRIPT stop
|
|
||||||
|
|
||||||
exit
|
|
Loading…
Reference in new issue