#!/bin/bash
#
# ============LICENSE_START==========================================
# org.onap.dmaap
# ===================================================================
# Copyright © 2018 AT&T Intellectual Property. All rights reserved.
# ===================================================================
# 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.
# ============LICENSE_END============================================
# ECOMP is a trademark and service mark of AT&T Intellectual Property.
#
#

umask 0022
TZ=GMT0
COMPONENT=dmaapbc
APP_ROOT=/opt/app/$COMPONENT
USER=root
export TZ
PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/java/jdk/jdk180/bin
export PATH
CLASSPATH=`echo $APP_ROOT/etc $APP_ROOT/lib/*.jar | tr ' ' ':'` 
export CLASSPATH
CONFIGMAP_ROOT=${CONFIGMAP_ROOT:-/opt/app/config}
CONFIGMAP_PROPS=${CONFIGMAP_PROPS:-$CONFIGMAP_ROOT/conf/dmaapbc.properties}
CONTAINER_CONFIG=$CONFIGMAP_ROOT/conf/buscontroller.env
MAIN=org.onap.dmaap.dbcapi.server.Main 



pids() {
	set -x
	ps -ef | grep java | grep $MAIN | sed -e 's/[^ ]* *//' -e 's/ .*//'
	set +x
}

config() {
	echo "ENTER config"
	set -x
	if [ ! -d $APP_ROOT ]
	then
		echo "Expected app root directory $APP_ROOT does not exist"
		exit 1
	fi
	if [ !  -f $CONTAINER_CONFIG ]
	then
		echo "WARNING: Expected env file $CONTAINER_CONFIG not found. Default behaviors in effect"
		find $CONTAINER_ROOT -type f
	fi
	cd $APP_ROOT
	source $CONTAINER_CONFIG

	if [ "$DMAAPBC_WAIT_TO_EXIT" != "Y" ]
	then
		echo "Creating $APP_ROOT/ok_to_exit so no waiting..."
		> $APP_ROOT/ok_to_exit
	else
		echo "Not creating $APP_ROOT/ok_to_exit"
	fi	
	
	if [ ! -f $APP_ROOT/misc/cert-client-init.sh ]
	then
		echo "Did not find $APP_ROOT/misc/cert-client-init.sh to append to truststore"
		exit 1
	fi
	$APP_ROOT/misc/cert-client-init.sh
	. misc/havecert.tmpl > etc/havecert
	chmod +x etc/havecert

	# These files might be better provided in kubernetes configmaps
	# so if they are there, use them
	if [ -f $CONFIGMAP_PROPS ]
	then
		PROPS=$CONFIGMAP_PROPS
	else
		PROPS=etc/dmaapbc.properties
		. misc/dmaapbc.properties.tmpl > $PROPS
	fi
	if [ ! -f config/PolicyEngineApi.properties ]
	then
    		. misc/PolicyEngineApi.properties.tmpl > config/PolicyEngineApi.properties
	fi
	set +x
}

start() {
	echo "ENTER start"
	set -x
	ID=`id -n -u`
	GRP=`id -n -g`
	if [ "$ID" != "$USER" ]
	then
		echo $COMPONENT must be started as user $USER not $ID
		exit 1
	fi
	if [ "$GRP" != "$USER" ]
	then
		echo $COMPONENT must be started as group $USER not $GRP
		exit 1
	fi
	cd $APP_ROOT
	pwd

	if etc/havecert
	then
		echo >/dev/null
	else
		echo No certificate file available.  Cannot start
		exit 0
	fi
	PIDS=`pids`
	if [ "$PIDS" != "" ]
	then
		echo $COMPONENT already running
		exit 0
	fi
	rm -f $APP_ROOT/etc/SHUTDOWN

	# JVM flags
#old line from Dockerfile...keep for reference only
	FLAGS="-cp etc:lib/* -Dlog4j.configuration=etc/log4j.properties -DConfigFile=$PROPS  -Dlogback.configurationFile=etc/logback.xml -Dhttps.protocols=TLSv1.2 -Dhttps.cipherSuites=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
	#nohup java $FLAGS $MAIN </dev/null >/dev/null 2>&1 &
	nohup java $FLAGS $MAIN </dev/null  &
	sleep 5
	PIDS=`pids`
	set +x
}

stop() {
	echo "ENTER stop"
	ID=`id -n -u`
	GRP=`id -n -g`
	if [ "$ID" != "$USER" ]
	then
		echo $COMPONENT must be stopped as user $USER not $ID
		exit 1
	fi
	if [ "$GRP" != "$USER" ]
	then
		echo $COMPONENT must be stopped as group $USER not $GRP
		exit 1
	fi
	touch $APP_ROOT/etc/SHUTDOWN
	PIDS=`pids`
	if [ "$PIDS" != "" ]
	then
		sleep 5
		kill -9 $PIDS
		sleep 5
		echo $COMPONENT stopped
	else
		echo $COMPONENT not running
	fi
}

status() {
	echo "ENTER status"
	PIDS=`pids`
	if [ "$PIDS" != "" ]
	then
		echo $COMPONENT running
	else
		echo $COMPONENT not running
	fi
}

init() {
	echo "ENTER init"
	if [ ! -d $CONFIGMAP_ROOT ]
	then
		echo $CONFIGMAP_ROOT does not exist
		return
	fi

	#loop on get /dmaap until we get a good response to indicate other provisioning can continue
	rc=999
	while [ $rc != "200" ]
	do
		sleep 10
		rc=`curl -s -o /dev/null -I -w "%{http_code}" -X GET -H "Content-Type: application/json" http://dmaap-bc:8080/webapi/dmaap`
		echo "get dmaap response=${rc}"
	done

	cd $CONFIGMAP_ROOT
	pwd
	# order is important in this next list
	for uri in dmaap dcaeLocations mr_clusters topics feeds
	do
		if [ -d ${uri} ]
		then
			for j in `ls ${uri}/*.json`
			do
				echo "POST $j to $uri"
				rc=`curl -v -X POST -w "%{http_code}" -H "Content-Type: application/json" -d @${j} http://dmaap-bc:8080/webapi/${uri}`
				echo "response=$rc"
			done
		fi
	done
}

set -x
case "$1" in
'deploy')
	config
	start
	#init
	wait
	;;
'start')
	start
	;;
'stop')
	stop
	;;
'restart')
	stop
	sleep 20
	start
	;;
'status')
	status
	;;
*)
	echo "Usage: $0 { start | stop | restart }"
	exit 1
	;;
esac
		ls -l $APP_ROOT/logs/ONAP
		echo "------------ tail -100 error.log ---------------"
		tail -100  $APP_ROOT/logs/ONAP/error.log
		echo "------------ tail -100 server.log ---------------"
		tail -100  $APP_ROOT/logs/ONAP/server.log
		echo "------------ tail -100 application.log ---------------"
		tail -100 $APP_ROOT/logs/ONAP/application.log

		echo "Check $APP_ROOT/ok_to_exit"
		while [ ! -f $APP_ROOT/ok_to_exit ]
		do
			echo "$APP_ROOT/ok_to_exit does not exist.  Sticking around for debugging..."
			sleep 10
		done
exit 0
