Module: check_mk
Branch: master
Commit: a39f99e06fcc323826f5eb1783c95c14e3cde738
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a39f99e06fcc32…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Dec 20 14:55:25 2013 +0100
Setup: define log_dir in defaults ($var_dir/log)
---
defaults | 1 +
scripts/setup.sh | 13 ++++++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/defaults b/defaults
index 59db1c7..a3edcbe 100644
--- a/defaults
+++ b/defaults
@@ -9,6 +9,7 @@ check_manpages_dir = 'checkman'
agents_dir = 'agents'
modules_dir = 'modules'
var_dir = 'var'
+log_dir = 'var/log'
autochecksdir = 'var/autochecks'
precompiled_hostchecks_dir = 'var/precompiled'
counters_directory = 'var/counters'
diff --git a/scripts/setup.sh b/scripts/setup.sh
index 41d1c64..a928ebe 100755
--- a/scripts/setup.sh
+++ b/scripts/setup.sh
@@ -250,8 +250,8 @@ ask_dir checkmandir /usr/share/doc/$NAME/checks
$HOMEBASEDIR/doc/checks $OMD_ROO
"Directory for manuals for the various checks. The manuals can be viewed
with check_mk -M <CHECKNAME>"
-ask_dir vardir /var/lib/$NAME $HOMEBASEDIR/var $OMD_ROOT/var/check_mk "working
directory of check_mk" \
- "check_mk will create caches files, automatically created checks and
+ask_dir vardir /var/lib/$NAME $HOMEBASEDIR/var $OMD_ROOT/var/check_mk "working
directory of Check_MK" \
+ "Check_MK will create log files, automatically created checks and
other files into this directory. The setup will create several subdirectories
and makes them writable by the Nagios process"
@@ -481,8 +481,9 @@ check_manpages_dir = '$checkmandir'
modules_dir = '$modulesdir'
locale_dir = '$localedir'
agents_dir = '$agentsdir'
-var_dir = '$vardir'
lib_dir = '$libdir'
+var_dir = '$vardir'
+log_dir = '$vardir/log'
snmpwalks_dir = '$vardir/snmpwalks'
autochecksdir = '$vardir/autochecks'
precompiled_hostchecks_dir = '$vardir/precompiled'
@@ -812,15 +813,17 @@ do
sed -ri 's@^export MK_LIBDIR="(.*)"@export
MK_LIBDIR="'"$agentslibdir"'"@' $agent
sed -ri 's@^export MK_CONFDIR="(.*)"@export
MK_CONFDIR="'"$agentsconfdir"'"@' $agent
done &&
- mkdir -p
$DESTDIR$vardir/{autochecks,counters,precompiled,cache,logwatch,web,wato,notify}
&&
+ mkdir -p
$DESTDIR$vardir/{autochecks,counters,precompiled,cache,logwatch,web,wato,notify,log}
&&
if [ -z "$DESTDIR" ] && id "$nagiosuser" > /dev/null
2>&1 && [ $UID = 0 ] ; then
chown -R $nagiosuser $DESTDIR$vardir/{counters,cache,logwatch,notify}
- chown $nagiosuser $DESTDIR$vardir/web
+ chown $nagiosuser $DESTDIR$vardir/{web,log}
fi &&
mkdir -p $DESTDIR$confdir/conf.d &&
if [ -z "$DESTDIR" ] ; then
chgrp -R $wwwgroup $DESTDIR$vardir/web &&
chmod -R g+w $DESTDIR$vardir/web &&
+ chgrp -R $wwwgroup $DESTDIR$vardir/log &&
+ chmod -R g+w $DESTDIR$vardir/log &&
chgrp -R $wwwgroup $DESTDIR$vardir/wato &&
chmod -R g+w $DESTDIR$vardir/wato
mkdir -p $DESTDIR$vardir/tmp &&