X-Git-Url: https://gerrit.onap.org/r/gitweb?p=ccsdk%2Fdistribution.git;a=blobdiff_plain;f=opendaylight%2Fonap-distribution%2Ffluorine%2Fkaraf%2Fsrc%2Fmain%2Fassembly%2Fbin%2Fset_persistence.sh;fp=opendaylight%2Fonap-distribution%2Ffluorine%2Fkaraf%2Fsrc%2Fmain%2Fassembly%2Fbin%2Fset_persistence.sh;h=15c227176368803dccb62b4b3f8c9843f6fb878b;hp=0000000000000000000000000000000000000000;hb=a41427f14b8b056640e5853f5ec61284fb23acaa;hpb=78327d7d3e648a393ce247216e99fb4d966bd79e diff --git a/opendaylight/onap-distribution/fluorine/karaf/src/main/assembly/bin/set_persistence.sh b/opendaylight/onap-distribution/fluorine/karaf/src/main/assembly/bin/set_persistence.sh new file mode 100755 index 00000000..15c22717 --- /dev/null +++ b/opendaylight/onap-distribution/fluorine/karaf/src/main/assembly/bin/set_persistence.sh @@ -0,0 +1,111 @@ +#!/bin/bash +# +# Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v1.0 which accompanies this distribution, +# and is available at http://www.eclipse.org/legal/epl-v10.html +# + + +function usage() +{ + # Print any error messages + test "$1" != "" && echo " ERROR: $1" + + # Print standard usage help + cat << EOF + This script is used to enable or disable the config datastore + persistence. The default state is enabled. The user should + restart controller to apply changes. The script can be used + before starting controller for the first time. + + Usage: $0 + +EOF + + exit 1 +} + + +function end_banner +{ +cat <\(.*\)<\/version>/\1/p' ${ORIG_CONF_DIR}/maven-metadata-local.xml) + ORIG_CONF_DIR=${ORIG_CONF_DIR}/${version} + ORIG_CLUSTER_CONF=sal-clustering-config-${version}-datastore.cfg + + if [ -f ${ORIG_CONF_DIR}/${ORIG_CLUSTER_CONF} ]; then + cat <