You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
Merge pull request #1023 from LinuxJedi/mariadb-systemctl
MCOL-3718 Use systemd instead of mysql-Columnstore
This commit is contained in:
committed by
Patrick LeBlanc
parent
61574cd00d
commit
da32afc0b2
@ -11,7 +11,13 @@ checkForError() {
|
||||
if [ `cat ${tmpdir}/error.check | wc -c` -ne 0 ]; then
|
||||
echo "MySQL Password file missing or incorrect, check .my.cnf file"
|
||||
rm -f ${tmpdir}/error.check
|
||||
mysql-Columnstore stop
|
||||
# Test we are using systemd
|
||||
systemctl cat mariadb.service > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
systemctl stop mariadb.service > /dev/null 2>&1
|
||||
else
|
||||
pkill mysqld
|
||||
fi
|
||||
sleep 2
|
||||
exit 2;
|
||||
fi
|
||||
@ -54,9 +60,23 @@ for arg in "$@"; do
|
||||
done
|
||||
|
||||
# Restart in the same way that mysqld will be started normally.
|
||||
mysql-Columnstore stop >/dev/null 2>&1
|
||||
# Test we are using systemd
|
||||
systemctl cat mariadb.service > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
systemctl stop mariadb.service > /dev/null 2>&1
|
||||
else
|
||||
pkill mysqld
|
||||
fi
|
||||
sleep 2
|
||||
mysql-Columnstore start --skip-grant-tables
|
||||
export MYSQL_OPTS="--skip-grant-tables"
|
||||
# Test we are using systemd
|
||||
systemctl cat mariadb.service > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
systemctl start mariadb.service
|
||||
else
|
||||
/usr/bin/mysqld_safe --skip-grant-tables &
|
||||
fi
|
||||
unset MYSQL_OPTS
|
||||
|
||||
sleep 5
|
||||
|
||||
@ -65,12 +85,24 @@ install_mcs_mysql.sh --tmpdir=$tmpdir
|
||||
checkForError
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR: Invalid password in .my.cnf, or Columnstore plugin install missing"
|
||||
mysql-Columnstore stop
|
||||
# Test we are using systemd
|
||||
systemctl cat mariadb.service > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
systemctl stop mariadb.service > /dev/null 2>&1
|
||||
else
|
||||
pkill mysqld
|
||||
fi
|
||||
sleep 2
|
||||
exit 2;
|
||||
fi
|
||||
|
||||
mysql-Columnstore stop
|
||||
# Test we are using systemd
|
||||
systemctl cat mariadb.service > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
systemctl stop mariadb.service > /dev/null 2>&1
|
||||
else
|
||||
pkill mysqld
|
||||
fi
|
||||
|
||||
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user