diff options
Diffstat (limited to 'aai-resources/src/main/scripts/forceDeleteTool.sh')
-rw-r--r-- | aai-resources/src/main/scripts/forceDeleteTool.sh | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/aai-resources/src/main/scripts/forceDeleteTool.sh b/aai-resources/src/main/scripts/forceDeleteTool.sh index 9c199bc..cb87b38 100644 --- a/aai-resources/src/main/scripts/forceDeleteTool.sh +++ b/aai-resources/src/main/scripts/forceDeleteTool.sh @@ -66,37 +66,19 @@ # # +COMMON_ENV_PATH=$( cd "$(dirname "$0")" ; pwd -P ) +. ${COMMON_ENV_PATH}/common_functions.sh -echo -echo `date` " Starting $0" +start_date; echo " NOTE - if you are deleting data, please run the dataSnapshot.sh script first or " echo " at least make a note the details of the node that you are deleting. " -userid=$( id | cut -f2 -d"(" | cut -f1 -d")" ) -if [ "${userid}" != "aaiadmin" ]; then - echo "You must be aaiadmin to run $0. The id used $userid." - exit 1 -fi +check_user; +source_profile; -. /etc/profile.d/aai.sh -PROJECT_HOME=/opt/app/aai-resources +execute_spring_jar org.onap.aai.dbgen.ForceDeleteTool ${PROJECT_HOME}/resources/etc/appprops/forceDelete-logback.xml "$@" -for JAR in `ls $PROJECT_HOME/extJars/*.jar` -do - CLASSPATH=$CLASSPATH:$JAR -done - -for JAR in `ls $PROJECT_HOME/lib/*.jar` -do - CLASSPATH=$CLASSPATH:$JAR -done - - -$JAVA_HOME/bin/java -classpath $CLASSPATH -Dhttps.protocols=TLSv1.1,TLSv1.2 -DAJSC_HOME=$PROJECT_HOME -Daai.home=$PROJECT_HOME \ - org.onap.aai.dbgen.ForceDeleteTool "$@" - - -echo `date` " Done $0" +end_date; exit 0 |