summaryrefslogtreecommitdiffstats
path: root/engine-d-standalone/src
diff options
context:
space:
mode:
authorGuangrongFu <fu.guangrong@zte.com.cn>2021-06-04 16:31:47 +0800
committerGuangrong Fu <fu.guangrong@zte.com.cn>2021-06-04 08:43:04 +0000
commitf6b820706df03f17fa41ad99035f7fd8761e47b7 (patch)
tree29f111e38c17a599e74fc4876c0ba0a1d65b5dea /engine-d-standalone/src
parentff774a309d82c6d71064d32505492d7d0d8544cf (diff)
bugfix - accessibility of RESTful APIs
Change-Id: I85ecff0afa49f5588a5f0d63697b40d9a663233f Issue-ID: HOLMES-454 Signed-off-by: GuangrongFu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'engine-d-standalone/src')
-rw-r--r--engine-d-standalone/src/main/assembly/bin/find_kill_process.bat24
-rw-r--r--engine-d-standalone/src/main/assembly/bin/initDB.bat34
-rw-r--r--engine-d-standalone/src/main/assembly/bin/initDB.sh6
-rw-r--r--engine-d-standalone/src/main/assembly/bin/run.bat41
-rw-r--r--engine-d-standalone/src/main/assembly/bin/run.sh2
-rw-r--r--engine-d-standalone/src/main/assembly/bin/stop.bat34
6 files changed, 4 insertions, 137 deletions
diff --git a/engine-d-standalone/src/main/assembly/bin/find_kill_process.bat b/engine-d-standalone/src/main/assembly/bin/find_kill_process.bat
deleted file mode 100644
index 6c61d50..0000000
--- a/engine-d-standalone/src/main/assembly/bin/find_kill_process.bat
+++ /dev/null
@@ -1,24 +0,0 @@
-@REM
-@REM Copyright 2017 ZTE Corporation.
-@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/engine-d-standalone/src/main/assembly/bin/initDB.bat b/engine-d-standalone/src/main/assembly/bin/initDB.bat
deleted file mode 100644
index 84b2e54..0000000
--- a/engine-d-standalone/src/main/assembly/bin/initDB.bat
+++ /dev/null
@@ -1,34 +0,0 @@
-@REM
-@REM Copyright 2017 ZTE Corporation.
-@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
-set HOME=%~dp0
-set user=%1
-set password=%2
-set port=%3
-set host=%4
-echo start init holmes engine-d db
-echo HOME=%HOME%
-set main_path=%HOME%..\
-cd /d %main_path%
-mysql -u%user% -p%password% -P%port% -h%host% < %main_path%\dbscripts\mysql\onap-holmes_engine_d-createobj.sql
-set "err=%errorlevel%"
-if "%err%"=="0" (
- echo init engine-d db success
- ) else (
- echo failed init engine-d db
- pause
- ) \ No newline at end of file
diff --git a/engine-d-standalone/src/main/assembly/bin/initDB.sh b/engine-d-standalone/src/main/assembly/bin/initDB.sh
index 94e7607..dac6878 100644
--- a/engine-d-standalone/src/main/assembly/bin/initDB.sh
+++ b/engine-d-standalone/src/main/assembly/bin/initDB.sh
@@ -47,11 +47,11 @@ if [ -z `env | grep PGPASSWORD` ]; then
need_unset=1
fi
-psql -U "'$user'" -p "'$port'" -h "'$host'" -d "'$dbname'" -f $main_path/dbscripts/postgresql/onap-holmes_engine-createobj.sql
-psql -U "'$user'" -p "'$port'" -h "'$host'" -d "'$dbname'" --command 'select * from alarm_info;'
+psql -U "$user" -p "$port" -h "$host" -d "$dbname" -f $main_path/dbscripts/postgresql/onap-holmes_engine-createobj.sql
+psql -U "$user" -p "$port" -h "$host" -d "$dbname" --command 'select * from alarm_info;'
sql_result=$?
-if [ "$need_unset"x == "1"x ]; then
+if [ "$need_unset"x = "1"x ]; then
unset PGPASSWORD
fi
diff --git a/engine-d-standalone/src/main/assembly/bin/run.bat b/engine-d-standalone/src/main/assembly/bin/run.bat
deleted file mode 100644
index e61f25a..0000000
--- a/engine-d-standalone/src/main/assembly/bin/run.bat
+++ /dev/null
@@ -1,41 +0,0 @@
-@REM
-@REM Copyright 2017 ZTE Corporation.
-@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 holmes-engine-d-service
-
-set RUNHOME=%~dp0
-echo ### RUNHOME: %RUNHOME%
-echo ### Starting engine-d-service
-set main_path=%RUNHOME%..\
-cd /d %main_path%
-set JAVA="%JAVA_HOME%\bin\java.exe"
-set port=8312
-set jvm_opts=-Xms50m -Xmx128m
-rem set jvm_opts=%jvm_opts% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=%port%,server=y,suspend=n
-set class_path=%main_path%;%main_path%holmes-engine-d.jar
-echo ### jvm_opts: %jvm_opts%
-echo ### class_path: %class_path%
-
-%JAVA% -classpath %class_path% %jvm_opts% EngineDActiveApp server %main_path%conf/engine-d.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/engine-d-standalone/src/main/assembly/bin/run.sh b/engine-d-standalone/src/main/assembly/bin/run.sh
index f565e2e..b7aea04 100644
--- a/engine-d-standalone/src/main/assembly/bin/run.sh
+++ b/engine-d-standalone/src/main/assembly/bin/run.sh
@@ -94,7 +94,7 @@ echo "KEY_PASS=$KEY_PASSWORD"
sed -i "s|keyStorePath:.*|keyStorePath: $KEY_PATH|" "$main_path/conf/engine-d.yml"
sed -i "s|keyStorePassword:.*|keyStorePassword: $KEY_PASSWORD|" "$main_path/conf/engine-d.yml"
-if [ ${ENABLE_ENCRYPT} = true ]; then
+if [ "${ENABLE_ENCRYPT}"x = "true"x ]; then
sed -i "s|type:\s*https\?$|type: https|" "$main_path/conf/engine-d.yml"
sed -i "s|#\?keyStorePath|keyStorePath|" "$main_path/conf/engine-d.yml"
sed -i "s|#\?keyStorePassword|keyStorePassword|" "$main_path/conf/engine-d.yml"
diff --git a/engine-d-standalone/src/main/assembly/bin/stop.bat b/engine-d-standalone/src/main/assembly/bin/stop.bat
deleted file mode 100644
index f4ed01b..0000000
--- a/engine-d-standalone/src/main/assembly/bin/stop.bat
+++ /dev/null
@@ -1,34 +0,0 @@
-@REM
-@REM Copyright 2017 ZTE Corporation.
-@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 engine-d-service
-
-set HOME=%~dp0
-set Main_Class="EngineDActiveApp"
-
-echo ================== engine-d-service info =============================================
-echo HOME=$HOME
-echo Main_Class=%Main_Class%
-echo ===============================================================================
-
-echo ### Stopping engine-d-service
-cd /d %HOME%
-
-for /f "delims=" %%i in ('"%JAVA_HOME%\bin\jcmd"') do (
- call find_kill_process "%%i" %Main_Class%
-)
-exit \ No newline at end of file