From bd890c575163e4d87ac24198b9c68a39cf4bbc4d Mon Sep 17 00:00:00 2001 From: sg481n Date: Mon, 28 Aug 2017 12:11:35 -0400 Subject: Update project structure to org.onap.aaf Update project structure of authz module in aaf from com.att to org.onap.aaf and add distribution management and repositories. Issue-id: AAF-21 Change-Id: Ia2486954e99f2bd60f18122ed60d32d5590781e9 Signed-off-by: sg481n --- authz-service/src/main/swm/common/deinstall.sh | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 authz-service/src/main/swm/common/deinstall.sh (limited to 'authz-service/src/main/swm/common/deinstall.sh') diff --git a/authz-service/src/main/swm/common/deinstall.sh b/authz-service/src/main/swm/common/deinstall.sh new file mode 100644 index 00000000..740564ce --- /dev/null +++ b/authz-service/src/main/swm/common/deinstall.sh @@ -0,0 +1,40 @@ +#!/bin/sh +############################################################################## +# - Copyright 2012, 2016 AT&T Intellectual Properties +############################################################################## +umask 022 +ROOT_DIR=${INSTALL_ROOT}/${distFilesRootDirPath} + +# Grab the IID of all resources running under the name and same version(s) we're working on and stop those instances +${LRM_HOME}/bin/lrmcli -running | \ + grep ${artifactId} | \ + grep ${version} | \ + cut -f1 | \ +while read _iid +do + if [ -n "${_iid}" ]; then + ${LRM_HOME}/bin/lrmcli -shutdown -iid ${_iid} | grep SUCCESS + if [ $? -ne 0 ]; then + echo "$LRMID-{_iid} Shutdown failed" + fi + fi +done + +# Grab the resources configured under the name and same version we're working on and delete those instances +${LRM_HOME}/bin/lrmcli -configured | \ + grep ${artifactId} | \ + grep ${version} | \ + cut -f1,2,3 | \ +while read _name _version _routeoffer +do + if [ -n "${_name}" ]; then + ${LRM_HOME}/bin/lrmcli -delete -name ${_name} -version ${_version} -routeoffer ${_routeoffer} | grep SUCCESS + if [ $? -ne 0 ]; then + echo "${_version} Delete failed" + fi + fi +done + +rm -rf ${ROOT_DIR} + +exit 0 -- cgit 1.2.3-korg