summaryrefslogtreecommitdiffstats
path: root/auth/sample/bin
diff options
context:
space:
mode:
authorSai Gandham <sai.gandham@att.com>2019-04-30 16:04:01 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-30 16:04:01 +0000
commit8748d6d6d0c654134712a26fa795520d895ca878 (patch)
tree16a58a8e96b65130a86d1fdf349680163e5c5600 /auth/sample/bin
parentcf689f208d2fdc19586192d164c75f795295b41a (diff)
parentf64f482462b697e06a47ad55aa5447dc829ce727 (diff)
Merge "Clean LOCAL Dir based on VERSION"
Diffstat (limited to 'auth/sample/bin')
-rwxr-xr-xauth/sample/bin/client.sh8
-rw-r--r--auth/sample/bin/service.sh10
2 files changed, 16 insertions, 2 deletions
diff --git a/auth/sample/bin/client.sh b/auth/sample/bin/client.sh
index dbf08622..9e3b2fd7 100755
--- a/auth/sample/bin/client.sh
+++ b/auth/sample/bin/client.sh
@@ -114,7 +114,13 @@ if [ ! -e "$DOT_AAF/keyfile" ]; then
fi
echo "cat SSO"
cat ${SSO}
-echo "dog"
+
+# Should we clean up?
+if [ "${VERSION}" != "$(cat ${LOCAL}/VERSION)" ]; then
+ echo "Clean up directory ${LOCAL}"
+ rm -Rf ${LOCAL}/*
+fi
+echo "${VERSION}" > $LOCAL/VERSION
# Only initialize once, automatically...
if [ ! -e $LOCAL/${NS}.props ]; then
diff --git a/auth/sample/bin/service.sh b/auth/sample/bin/service.sh
index 1a289d35..a4d2aba1 100644
--- a/auth/sample/bin/service.sh
+++ b/auth/sample/bin/service.sh
@@ -105,7 +105,13 @@ if [ ! -e $FILE ]; then
fi
fi
-# echo "Check keyfile"
+# Should we clean up?
+if [ "${VERSION}" != "$(cat ${LOCAL}/VERSION)" ]; then
+ echo "Clean up directory ${LOCAL}"
+ rm -Rf ${LOCAL}/*
+fi
+echo "${VERSION}" > $LOCAL/VERSION
+
FILE="$LOCAL/org.osaaf.aaf.p12"
if [ ! -e $FILE ]; then
if [ -e $CONFIG/cert/org.osaaf.aaf.p12 ]; then
@@ -157,6 +163,8 @@ if [ ! -e $LOCAL/org.osaaf.aaf.props ]; then
$JAVA_AGENT config \
aaf@aaf.osaaf.org \
cadi_etc_dir=$LOCAL \
+ cadi_latitude=${cadi_latitude} \
+ cadi_longitude=${cadi_longitude} \
cadi_prop_files=$CONFIG/local/initialConfig.props:$CONFIG/local/aaf.props:${TMP}
rm ${TMP}