Title: [opsview] [12464] Move bin/profile_local to etc/profile_local
- Revision
- 12464
- Author
- dferguson
- Date
- 2013-06-07 13:45:35 +0100 (Fri, 07 Jun 2013)
Log Message
Move bin/profile_local to etc/profile_local
Modified Paths
Modified: trunk/opsview-core/bin/profile
===================================================================
--- trunk/opsview-core/bin/profile 2013-06-07 11:48:56 UTC (rev 12463)
+++ trunk/opsview-core/bin/profile 2013-06-07 12:45:35 UTC (rev 12464)
@@ -1,6 +1,10 @@
-# sh compatible profile for nagios user. Sourced at rc.opsview, nagios user login
-# and crontabs which need the profile
+# sh compatible profile for nagios user. Sourced at rc.opsview, nagios user
+# login # and crontabs which need the profile
#
+##############################################################################
+#### DO NOT CHANGE THIS FILE - make changes via etc/profile_local instead ####
+##############################################################################
+#
# AUTHORS:
# Copyright (C) 2003-2013 Opsview Limited. All rights reserved
#
@@ -20,6 +24,9 @@
# along with Opsview; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
+##############################################################################
+#### DO NOT CHANGE THIS FILE - make changes via etc/profile_local instead ####
+##############################################################################
OPSVIEW_BASE=/usr/local/nagios
export OPSVIEW_BASE
OPSVIEW_PERLLIB="$OPSVIEW_BASE/lib:$OPSVIEW_BASE/perl/lib:/opt/opsview/perl/lib/perl5"
@@ -105,8 +112,11 @@
fi
# check to see if there is a local profile and source that, also
-if [ -f $OPSVIEW_BASE/bin/profile_local ]; then
- . $OPSVIEW_BASE/bin/profile_local
+if [ -f $OPSVIEW_BASE/etc/profile_local ]; then
+ . $OPSVIEW_BASE/etc/profile_local
fi
# Must return ok
+##############################################################################
+#### DO NOT CHANGE THIS FILE - make changes via etc/profile_local instead ####
+##############################################################################
Modified: trunk/opsview-core/bin/send2slaves
===================================================================
--- trunk/opsview-core/bin/send2slaves 2013-06-07 11:48:56 UTC (rev 12463)
+++ trunk/opsview-core/bin/send2slaves 2013-06-07 12:45:35 UTC (rev 12464)
@@ -163,6 +163,9 @@
if ( -e "$base/etc/nrpe.cfg" ) {
$dirs .= " etc/nrpe.cfg";
}
+if ( -e "$base/etc/profile_local" ) {
+ $dirs .= " etc/profile_local";
+}
if ( $full_install && -d "/opt/opsview/perl" ) {
$dirs .= " -C / opt/opsview/perl";
}
Modified: trunk/opsview-core/etc/.gitignore
===================================================================
--- trunk/opsview-core/etc/.gitignore 2013-06-07 11:48:56 UTC (rev 12463)
+++ trunk/opsview-core/etc/.gitignore 2013-06-07 12:45:35 UTC (rev 12464)
@@ -25,6 +25,7 @@
/nsca.cfg
/opsview.conf
/plugins
+/profile_local
/rss.cfg
/runtime.cfg
/send_nsca.cfg
Modified: trunk/opsview-core/installer/set_profile
===================================================================
--- trunk/opsview-core/installer/set_profile 2013-06-07 11:48:56 UTC (rev 12463)
+++ trunk/opsview-core/installer/set_profile 2013-06-07 12:45:35 UTC (rev 12464)
@@ -47,8 +47,8 @@
cd $HOME
# create a local profile that will not be lost on an upgrade if it doesn't exist
-if [ ! -f /usr/local/nagios/bin/profile_local ]; then
- echo "# Local profile - this file will not be changed in an upgrade" > /usr/local/nagios/bin/profile_local
+if [ ! -f /usr/local/nagios/etc/profile_local ]; then
+ echo "# Local profile - this file will not be changed in an upgrade" > /usr/local/nagios/etc/profile_local
fi
# make sure line is added to all files that exist, not just the first found
_______________________________________________
Opsview-checkins mailing list
Opsview-checkins@lists.opsview.org
http://lists.opsview.org/lists/listinfo/opsview-checkins