diff options
author | Zlatko Murgoski <zlatko.murgoski@nokia.com> | 2019-02-04 09:27:00 +0100 |
---|---|---|
committer | Zlatko Murgoski <zlatko.murgoski@nokia.com> | 2019-03-01 07:50:28 +0100 |
commit | e7360f7e7e77672b885087af68a3d96ebbc8c313 (patch) | |
tree | 8316d86334ec400b48f5a7a6a862fe7ffd9b9867 /src/main/scripts/appController.sh | |
parent | 8971ae1e6ccc99811663652819206231065b1755 (diff) |
Restart Issue
Restart Issue
Issue-ID: DCAEGEN2-1104
Change-Id: Iac1ee2f79be00084f5c0cd963503d54d7d6e6cb9
Signed-off-by: Zlatko Murgoski <zlatko.murgoski@nokia.com>
Diffstat (limited to 'src/main/scripts/appController.sh')
-rw-r--r-- | src/main/scripts/appController.sh | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/main/scripts/appController.sh b/src/main/scripts/appController.sh index d141addf..97556c4c 100644 --- a/src/main/scripts/appController.sh +++ b/src/main/scripts/appController.sh @@ -1,5 +1,4 @@ #!/bin/bash - ### # ============LICENSE_START======================================================= # PROJECT @@ -22,26 +21,6 @@ ### source bin/logger.sh -updateKeystore() { - log "Updating keystore configuration" - aliasParameterName="collector.keystore.alias" - originalPropertyFile="etc/collector.properties" - temporaryPropertyFile="etc/collector.properties.tmp" - keystorePath=`grep collector.keystore.file.location ${originalPropertyFile} | tr -d '[:space:]' | cut -d"=" -f2` - keystorePasswordFile=`grep collector.keystore.passwordfile ${originalPropertyFile} | tr -d '[:space:]' | cut -d"=" -f2` - temporaryAlias=`/usr/bin/keytool -list -keystore $keystorePath < $keystorePasswordFile | grep "PrivateKeyEntry" | cut -d"," -f1` - newAlias=`echo $temporaryAlias | cut -d":" -f2` - sed "s~$aliasParameterName=.*~$aliasParameterName=$newAlias~g" ${originalPropertyFile} > ${temporaryPropertyFile} - echo `cat ${temporaryPropertyFile} > ${originalPropertyFile}` - rm ${temporaryPropertyFile} - log "Keystore configuration updated" -} - -tryToPollConfiguration() { - log "Trying to poll configuration from CBS before application starts" - ${JAVA_HOME}/bin/java -cp "etc:lib/*" org.onap.dcae.controller.PreAppStartupConfigUpdater -} - start() { log "Starting application" appPids=`pidof java` @@ -78,7 +57,7 @@ stop() { } case $1 in - "start") tryToPollConfiguration; updateKeystore; start ;; + "start") start ;; "stop") stop ;; "restart") stop; start ;; *) echo "Bad usage. Should be: /bin/bash <this> start/stop" |