1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-1944 - move cplogger to syslogSetup.sh

This commit is contained in:
David Hill
2018-11-21 10:25:19 -06:00
parent bb096737c3
commit 430f7c494c
2 changed files with 24 additions and 16 deletions

View File

@ -315,14 +315,6 @@ if [ -z "aws" ]; then
$installdir/bin/MCSgetCredentials.sh >/dev/null 2>&1
fi
#log install message
test -f $installdir/post/functions && . $installdir/post/functions
if [ $user = "root" ]; then
$installdir/bin/cplogger -i 19 "***** MariaDB Columnstore Installed *****"
else
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib $installdir/bin/cplogger -i 19 "***** MariaDB Columnstore Installed *****"
fi
#setup hadoop
hadoop=`which hadoop 2>/dev/null`
if [ -z "$hadoop" ]; then

View File

@ -227,16 +227,32 @@ if [ ! -z "$syslog_conf" ] ; then
fi
fi
# install Columnstore Log Rotate File
cp $installdir/bin/columnstoreLogRotate /etc/logrotate.d/columnstore > /dev/null 2>&1
chmod 644 /etc/logrotate.d/columnstore
restartSyslog
#log install message
test -f $installdir/post/functions && . $installdir/post/functions
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib $installdir/bin/cplogger -i 19 "***** MariaDB Columnstore Installed *****"
# install Columnstore Log Rotate File
if [ -d /etc/logrotate.d ]; then
cp $installdir/bin/columnstoreLogRotate /etc/logrotate.d/columnstore > /dev/null 2>&1
chmod 644 /etc/logrotate.d/columnstore
#do the logrotate to start with a fresh log file during install
logrotate -f /etc/logrotate.d/columnstore > /dev/null 2>&1
fi
#log install message and find the least permission that allows logging to work
CHMOD_LIST=("750" "770" "775" "777")
for CHMOD in "${CHMOD_LIST[@]}"; do
chmod $CHMOD /var/log/mariadb
chmod $CHMOD /var/log/mariadb/columnstore
test -f $installdir/post/functions && . $installdir/post/functions
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$installdir/lib $installdir/bin/cplogger -i 19 "***** MariaDB Columnstore Installed *****"
if [ -f /var/log/mariadb/columnstore/info.log ]; then
if [ ! -s /var/log/mariadb/columnstore/info.log ]; then
break
fi
fi
done
fi
}