blob: f96dd74bd376ceb0c5d3b7757f3cc5e7c9f62951 [file] [log] [blame]
Sylvain Desbureauxe6a1a372021-02-25 18:07:55 +01001#!/bin/bash
2{{/*
3#
4# Copyright 2016-2017 ZTE Corporation.
5# Copyright 2021 Orange
6#
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18#
19*/}}
20
21main_path="/home/uui"
22echo @main_path@ $main_path
23
24echo "Starting postgreSQL..."
25#service postgresql start
26postmaster -D /usr/share/postgresql/data &
27sleep 10
28
29echo "usecase-ui database init script start..."
30dbScript="$main_path/resources/bin/initDB.sh"
31source $dbScript 127.0.0.1 5432 postgres uui
32echo "usecase-ui database init script finished normally..."
33
34JAVA_PATH="$JAVA_HOME/bin/java"
35JAVA_OPTS="-Xms50m -Xmx128m"
36echo @JAVA_PATH@ $JAVA_PATH
37echo @JAVA_OPTS@ $JAVA_OPTS
38
39jar_path="$main_path/usecase-ui-server.jar"
40echo @jar_path@ $jar_path
41
42echo "Starting usecase-ui-server..."
43$JAVA_PATH $JAVA_OPTS -classpath $jar_path -jar $jar_path $SPRING_OPTS