summaryrefslogtreecommitdiffstats
path: root/packages/base/src/files/etc
diff options
context:
space:
mode:
Diffstat (limited to 'packages/base/src/files/etc')
-rw-r--r--packages/base/src/files/etc/cron.d/logrotate.cron1
-rw-r--r--packages/base/src/files/etc/cron.d/monitor.cron1
-rw-r--r--packages/base/src/files/etc/logrotate.d/monitor.conf7
-rw-r--r--packages/base/src/files/etc/monitor/monitor.cfg16
-rw-r--r--packages/base/src/files/etc/profile.d/env.sh27
-rw-r--r--packages/base/src/files/etc/profile.d/su.cfg1
6 files changed, 53 insertions, 0 deletions
diff --git a/packages/base/src/files/etc/cron.d/logrotate.cron b/packages/base/src/files/etc/cron.d/logrotate.cron
new file mode 100644
index 000000000..aa78eed24
--- /dev/null
+++ b/packages/base/src/files/etc/cron.d/logrotate.cron
@@ -0,0 +1 @@
+5 1 * * * /usr/sbin/logrotate -s ${{POLICY_HOME}}/var/logrotate.status ${{POLICY_HOME}}/etc/logrotate.d/monitor.conf
diff --git a/packages/base/src/files/etc/cron.d/monitor.cron b/packages/base/src/files/etc/cron.d/monitor.cron
new file mode 100644
index 000000000..4272bf487
--- /dev/null
+++ b/packages/base/src/files/etc/cron.d/monitor.cron
@@ -0,0 +1 @@
+* * * * * . ${{POLICY_HOME}}/etc/profile.d/env.sh; monitor.sh </dev/null > /dev/null 2>&1
diff --git a/packages/base/src/files/etc/logrotate.d/monitor.conf b/packages/base/src/files/etc/logrotate.d/monitor.conf
new file mode 100644
index 000000000..98971f753
--- /dev/null
+++ b/packages/base/src/files/etc/logrotate.d/monitor.conf
@@ -0,0 +1,7 @@
+${{POLICY_HOME}}/logs/monitor.log {
+ daily
+ rotate 10
+ compress
+ missingok
+ copytruncate
+}
diff --git a/packages/base/src/files/etc/monitor/monitor.cfg b/packages/base/src/files/etc/monitor/monitor.cfg
new file mode 100644
index 000000000..5314839e1
--- /dev/null
+++ b/packages/base/src/files/etc/monitor/monitor.cfg
@@ -0,0 +1,16 @@
+# Line Format: component=status where
+# component=pap|pdp|pypdp|configs|console|paplp|pdplp and
+# status=on|off|uninstalled where
+# on: component is to be monitored and should started
+# off: component is to be monitored and should stopped
+# uninstalled: component is NOT to be monitored
+# There should be no component duplicate lines
+
+pap=uninstalled
+pdp=uninstalled
+configs=uninstalled
+pypdp=uninstalled
+console=uninstalled
+paplp=uninstalled
+pdplp=uninstalled
+brmsgw=uninstalled
diff --git a/packages/base/src/files/etc/profile.d/env.sh b/packages/base/src/files/etc/profile.d/env.sh
new file mode 100644
index 000000000..4d9fcf9a7
--- /dev/null
+++ b/packages/base/src/files/etc/profile.d/env.sh
@@ -0,0 +1,27 @@
+###
+# ============LICENSE_START=======================================================
+# ECOMP Policy Engine
+# ================================================================================
+# 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=========================================================
+###
+
+export POLICY_HOME=${{POLICY_HOME}}
+export POLICY_USER=${{POLICY_USER}}
+export POLICY_GROUP=${{POLICY_GROUP}}
+export KEYSTORE_PASSWD=${{KEYSTORE_PASSWD}}
+
+export JAVA_HOME=${{JAVA_HOME}}
+export PATH=${PATH}:${{POLICY_HOME}}/bin
diff --git a/packages/base/src/files/etc/profile.d/su.cfg b/packages/base/src/files/etc/profile.d/su.cfg
new file mode 100644
index 000000000..8ba4edd19
--- /dev/null
+++ b/packages/base/src/files/etc/profile.d/su.cfg
@@ -0,0 +1 @@
+#name=value pairs for su purposes