summaryrefslogtreecommitdiffstats
path: root/packages/base
diff options
context:
space:
mode:
authorJorge Hernandez <jorge.hernandez-herrero@att.com>2019-03-06 23:31:48 -0600
committerJorge Hernandez <jorge.hernandez-herrero@att.com>2019-03-07 08:59:56 -0600
commit30cf6d7f7d77f1e83a84bfea8e991ca867c9a96c (patch)
treecf64137d9b07dc57e8b71816bf0d97cd78070cb6 /packages/base
parent5ea44baa2e73af2f4404809656622955c1df7ec7 (diff)
Tweaking scripts to install for pdpd-cl image
Change-Id: I5f7ab5de402a5412938f42ae76e21f112b106b3a Issue-ID: POLICY-1560 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'packages/base')
-rwxr-xr-xpackages/base/src/files/etc/cron.d/monitor.cron6
-rw-r--r--packages/base/src/files/etc/profile.d/env.sh28
2 files changed, 25 insertions, 9 deletions
diff --git a/packages/base/src/files/etc/cron.d/monitor.cron b/packages/base/src/files/etc/cron.d/monitor.cron
index 68cb310f..338c1d44 100755
--- a/packages/base/src/files/etc/cron.d/monitor.cron
+++ b/packages/base/src/files/etc/cron.d/monitor.cron
@@ -1,8 +1,8 @@
###
# ============LICENSE_START=======================================================
-# Base Package
+# ONAP
# ================================================================================
-# Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2018-2019 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.
@@ -18,4 +18,4 @@
# ============LICENSE_END=========================================================
###
-* * * * * export POLICY_HOME=${{POLICY_HOME}}; ${{POLICY_HOME}}/bin/monitor >/dev/null 2>&1
+* * * * * bash -l -c '${POLICY_HOME}/bin/monitor >/dev/null 2>&1'
diff --git a/packages/base/src/files/etc/profile.d/env.sh b/packages/base/src/files/etc/profile.d/env.sh
index 833064fe..5a58940f 100644
--- a/packages/base/src/files/etc/profile.d/env.sh
+++ b/packages/base/src/files/etc/profile.d/env.sh
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
###
# ============LICENSE_START=======================================================
-# Base Package
+# ONAP
# ================================================================================
-# Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2017-2019 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.
@@ -19,16 +19,32 @@
# ============LICENSE_END=========================================================
###
+
+# some non-docker environments may set up POLICY_HOME
+# as a templated installation var (ie. ${{x}}) instead of
+# an environment variable (case of docker passed to the
+# container). The following condition accommodates that
+# scenario.
+
+templateRegex='^\$\{\{POLICY_HOME}}$'
+
+if [[ -z "${POLICY_HOME}" ]]; then
+ templatedPolicyHome='${{POLICY_HOME}}'
+ if [[ ! ${templatedPolicyHome} =~ ${templateRegex} ]]; then
+ POLICY_HOME=${templatedPolicyHome}
+ fi
+fi
+
set -a
-POLICY_HOME=${{POLICY_HOME}}
+POLICY_HOME=${POLICY_HOME:=/opt/app/policy}
-source ${POLICY_HOME}/etc/build.info
-for c in ${POLICY_HOME}/etc/profile.d/*.conf ; do
+confs=$(ls "${POLICY_HOME}"/etc/profile.d/*.conf 2> /dev/null)
+for c in ${confs} ; do
source ${c}
done
-for x in ${POLICY_HOME}/bin ${JAVA_HOME}/bin ${HOME}/bin ; do
+for x in "${POLICY_HOME}"/bin "${JAVA_HOME}"/bin "${HOME}"/bin ; do
if [ -d $x ] ; then
case ":$PATH:" in
*":$x:"*) :;; # already there
nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
/*-
 * ================================================================================
 * eCOMP Portal SDK
 * ================================================================================
 * Copyright (C) 2017 AT&T Intellectual Property
 * ================================================================================
 * 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.
 * ================================================================================
 */
package org.openecomp.portalsdk.core.web.support;

public interface ControllerProperties {

  static final String TASK_GET           = "get";
  static final String TASK_DELETE        = "delete";
  static final String TASK_SAVE          = "save";
  static final String TASK_PROCESS       = "process";
  static final String TASK_TOGGLE_ACTIVE = "toggleActive";
  static final String TASK_DOWNLOAD      = "download";
  static final String TASK_POPUP         = "popup";
  static final String TASK_LOOKUP        = "lookup";
  static final String TASK_ADD_ROW       = "addRow";
  static final String TASK_APPROVE       = "approve";
  static final String TASK_REJECT        = "reject";
  static final String TASK_RESET         = "reset";
  static final String TASK_ASSIGN        = "assign";
  static final String TASK_CUT           = "cut";
  static final String TASK_COPY          = "copy";
  static final String TASK_PASTE         = "paste";
  static final String TASK_SELECT        = "select";
}