guillaume.lambert | 34be248 | 2021-12-09 20:23:24 +0100 | [diff] [blame^] | 1 | #!/bin/sh |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 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 | |
| 21 | main_path="/home/uui" |
| 22 | echo @main_path@ $main_path |
| 23 | |
| 24 | echo "Starting postgreSQL..." |
| 25 | #service postgresql start |
| 26 | postmaster -D /usr/share/postgresql/data & |
| 27 | sleep 10 |
| 28 | |
| 29 | echo "usecase-ui database init script start..." |
| 30 | dbScript="$main_path/resources/bin/initDB.sh" |
guillaume.lambert | 34be248 | 2021-12-09 20:23:24 +0100 | [diff] [blame^] | 31 | $dbScript 127.0.0.1 5432 postgres uui |
Sylvain Desbureaux | e6a1a37 | 2021-02-25 18:07:55 +0100 | [diff] [blame] | 32 | echo "usecase-ui database init script finished normally..." |
| 33 | |
| 34 | JAVA_PATH="$JAVA_HOME/bin/java" |
| 35 | JAVA_OPTS="-Xms50m -Xmx128m" |
| 36 | echo @JAVA_PATH@ $JAVA_PATH |
| 37 | echo @JAVA_OPTS@ $JAVA_OPTS |
| 38 | |
| 39 | jar_path="$main_path/usecase-ui-server.jar" |
| 40 | echo @jar_path@ $jar_path |
| 41 | |
| 42 | echo "Starting usecase-ui-server..." |
guillaume.lambert | 34be248 | 2021-12-09 20:23:24 +0100 | [diff] [blame^] | 43 | $JAVA_PATH $JAVA_OPTS -classpath $jar_path -jar $jar_path $SPRING_OPTS |