blob: 4f523b9733bf324c2b25115e7d62f562d1b551d8 [file] [log] [blame]
mmis461cafd2018-09-05 10:35:44 +01001#!/bin/bash
2#
3# ============LICENSE_START=======================================================
4# Copyright (C) 2018 Ericsson. All rights reserved.
shaoqiu7c28dfd2019-06-26 04:08:11 +00005# Modifications Copyright (C) 2019 Nordix Foundation.
mmis461cafd2018-09-05 10:35:44 +01006# ================================================================================
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# SPDX-License-Identifier: Apache-2.0
20# ============LICENSE_END=========================================================
21#
22
ning.xi11319a12019-03-06 03:32:53 +000023JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk/
liboNetfc32c232018-12-18 09:22:00 +080024KEYSTORE="${POLICY_HOME}/etc/ssl/policy-keystore"
25KEYSTORE_PASSWD="Pol1cy_0nap"
26TRUSTSTORE="${POLICY_HOME}/etc/ssl/policy-truststore"
27TRUSTSTORE_PASSWD="Pol1cy_0nap"
28
mmis461cafd2018-09-05 10:35:44 +010029
Lianhao Lu3bd15a52018-11-07 11:46:28 +080030if [ "$#" -eq 1 ]; then
31 CONFIG_FILE=$1
32else
33 CONFIG_FILE=${CONFIG_FILE}
34fi
35
mmisb9eca382018-09-18 12:55:42 +010036if [ -z "$CONFIG_FILE" ]
37 then
shaoqiu7c28dfd2019-06-26 04:08:11 +000038 CONFIG_FILE="$POLICY_HOME/etc/defaultConfig.json"
mmisb9eca382018-09-18 12:55:42 +010039fi
40
Lianhao Lu3bd15a52018-11-07 11:46:28 +080041echo "Policy distribution config file: $CONFIG_FILE"
42
shaoqiu7c28dfd2019-06-26 04:08:11 +000043$JAVA_HOME/bin/java -cp "$POLICY_HOME/etc:$POLICY_HOME/lib/*" -Djavax.net.ssl.keyStore="$KEYSTORE" -Djavax.net.ssl.keyStorePassword="$KEYSTORE_PASSWD" -Djavax.net.ssl.trustStore="$TRUSTSTORE" -Djavax.net.ssl.trustStorePassword="$TRUSTSTORE_PASSWD" org.onap.policy.distribution.main.startstop.Main -c $CONFIG_FILE