X-Git-Url: https://gerrit.onap.org/r/gitweb?p=ccsdk%2Fdistribution.git;a=blobdiff_plain;f=opendaylight%2Fneon%2Fneon-alpine%2Fsrc%2Fmain%2Fodlscripts%2Fset_persistence.sh;fp=opendaylight%2Fneon%2Fneon-alpine%2Fsrc%2Fmain%2Fodlscripts%2Fset_persistence.sh;h=15c227176368803dccb62b4b3f8c9843f6fb878b;hp=0000000000000000000000000000000000000000;hb=5e5cc2b2ace3a5fe4b1b2394bfa5a32f4664e52b;hpb=0236046527e5c9784207ce8d2e11d455cd9b5f2e diff --git a/opendaylight/neon/neon-alpine/src/main/odlscripts/set_persistence.sh b/opendaylight/neon/neon-alpine/src/main/odlscripts/set_persistence.sh new file mode 100755 index 00000000..15c22717 --- /dev/null +++ b/opendaylight/neon/neon-alpine/src/main/odlscripts/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 <