summaryrefslogtreecommitdiffstats
path: root/auth/auth-cass/cass_init/cmd.sh
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-10-31 02:40:03 -0500
committerInstrumental <jonathan.gathman@att.com>2018-10-31 02:52:47 -0500
commit50c23cc7adb0c5aef4415b7bd38fecec29f4fb2a (patch)
tree8f1871410809da5c73937fb771d6235e6c28b8a4 /auth/auth-cass/cass_init/cmd.sh
parent7d6102863c924000d6e1b23f0c232f49e1f611a1 (diff)
Move to 2.1.17
Also, fix inconsistent startup of AAF Cass Issue-ID: AAF-598 Change-Id: I9300812ec8d2869e92621473ebd5933c9345f283 Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-cass/cass_init/cmd.sh')
-rw-r--r--auth/auth-cass/cass_init/cmd.sh22
1 files changed, 14 insertions, 8 deletions
diff --git a/auth/auth-cass/cass_init/cmd.sh b/auth/auth-cass/cass_init/cmd.sh
index fd0706f2..0683fde2 100644
--- a/auth/auth-cass/cass_init/cmd.sh
+++ b/auth/auth-cass/cass_init/cmd.sh
@@ -3,7 +3,8 @@
# Engage normal Cass Init, then check for data installation
#
DIR="/opt/app/aaf/status"
-INSTALLED_VERSION=/etc/cassandra/AAF_VERSION
+INSTALLED_VERSION=/var/lib/cassandra/AAF_VERSION
+AAF_INIT_DATA=/var/lib/cassandra/AAF_INIT_DATA
if [ ! -e /aaf_cmd ]; then
ln -s /opt/app/aaf/cass_init/cmd.sh /aaf_cmd
@@ -92,13 +93,18 @@ function install_cql {
function install_onap {
echo " cd /opt/app/aaf/cass_init"
install_cql initialized
- status prep data for bootstrapping
- cd /opt/app/aaf/cass_init
- status prep data
- bash prep.sh
- status push data to cassandra
- bash push.sh
- cd -
+ if [ -e "$AAF_INIT_DATA" ]; then
+ echo "AAF Data already initialized on this Cassandra"
+ else
+ status prep data for bootstrapping
+ cd /opt/app/aaf/cass_init
+ status prep data
+ bash prep.sh
+ status push data to cassandra
+ bash push.sh
+ cd -
+ echo $(date) > $AAF_INIT_DATA
+ fi
status ready
}