summaryrefslogtreecommitdiffstats
path: root/feature-eelf/src/main/feature/install
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2017-07-18 01:06:39 -0500
committerJorge Hernandez <jh1730@att.com>2017-07-18 09:18:43 -0500
commitae4a935b835c0dc588c7a53aef846dd6506b732f (patch)
treece2371f6dde3ed453fc0db0affa00038b51ae242 /feature-eelf/src/main/feature/install
parent8ce73e2fca0fdadd23e3557108742514af1205c3 (diff)
[POLICY-66] self-contained features support
installation/enable/disable of self contained package features: Feature 3rd party dependencies, configuration files, and custom installation scripts do not need to be packaged within the policy core base to be used. Change-Id: I35a472e63bd0f9f7aa6cd0c112d41d2b4604a892 Signed-off-by: Jorge Hernandez <jh1730@att.com>
Diffstat (limited to 'feature-eelf/src/main/feature/install')
-rw-r--r--feature-eelf/src/main/feature/install/disable33
-rw-r--r--feature-eelf/src/main/feature/install/enable35
2 files changed, 68 insertions, 0 deletions
diff --git a/feature-eelf/src/main/feature/install/disable b/feature-eelf/src/main/feature/install/disable
new file mode 100644
index 00000000..1eeb090e
--- /dev/null
+++ b/feature-eelf/src/main/feature/install/disable
@@ -0,0 +1,33 @@
+#! /bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# ONAP POLICY
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+##
+
+if [[ "${DEBUG}" == "y" ]]; then
+ set -x
+fi
+
+SYSTEM_PROPS="${POLICY_HOME}"/config/system.properties
+
+if [[ -f ${SYSTEM_PROPS} && -r ${SYSTEM_PROPS} ]]; then
+ if grep -q "^logback.configurationFile=.*$" "${SYSTEM_PROPS}"; then
+ sed -i -e "s|^logback.configurationFile=.*$|logback.configurationFile=config/logback.xml|" "${SYSTEM_PROPS}"
+ fi
+fi \ No newline at end of file
diff --git a/feature-eelf/src/main/feature/install/enable b/feature-eelf/src/main/feature/install/enable
new file mode 100644
index 00000000..55a2b99a
--- /dev/null
+++ b/feature-eelf/src/main/feature/install/enable
@@ -0,0 +1,35 @@
+#! /bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# ONAP POLICY
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+##
+
+if [[ "${DEBUG}" == "y" ]]; then
+ set -x
+fi
+
+SYSTEM_PROPS="${POLICY_HOME}"/config/system.properties
+
+if [[ -f ${SYSTEM_PROPS} && -r ${SYSTEM_PROPS} ]]; then
+ if grep -q "^logback.configurationFile=.*$" "${SYSTEM_PROPS}"; then
+ sed -i -e "s|^logback.configurationFile=.*$|logback.configurationFile=config/logback-eelf.xml|" "${SYSTEM_PROPS}"
+ else
+ echo "logback.configurationFile=config/logback-eelf.xml" >> "${SYSTEM_PROPS}"
+ fi
+fi \ No newline at end of file