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
MCOL-70
This commit is contained in:
@ -154,15 +154,32 @@ $installdir/bin/clearShm > /dev/null 2>&1
|
||||
|
||||
#setup the columnstore service script
|
||||
rm -f /etc/init.d/columnstore >/dev/null 2>&1
|
||||
cp $installdir/bin/columnstore /etc/init.d >/dev/null 2>&1
|
||||
if [ -x /sbin/chkconfig ]; then
|
||||
/sbin/chkconfig --add columnstore > /dev/null 2>&1
|
||||
/sbin/chkconfig columnstore on > /dev/null 2>&1
|
||||
elif [ -x /usr/sbin/update-rc.d ]; then
|
||||
/usr/sbin/update-rc.d columnstore defaults 99 > /dev/null 2>&1
|
||||
#cp $installdir/bin/columnstore /etc/init.d >/dev/null 2>&1
|
||||
|
||||
#check which system config to use
|
||||
systemctl=`which systemctl 2>/dev/null`
|
||||
if [ -z $systemctl ]; then
|
||||
$installdir/bin/setConfig -d Installation systemConfig systemctl
|
||||
|
||||
systemctl enable columnstore
|
||||
else
|
||||
chkconfig=`which chkconfig 2>/dev/null`
|
||||
if [ -z $chkconfig ]; then
|
||||
$installdir/bin/setConfig -d Installation systemConfig chkconfig
|
||||
|
||||
chkconfig --add columnstore > /dev/null 2>&1
|
||||
chkconfig columnstore on > /dev/null 2>&1
|
||||
else
|
||||
updaterc=`which update-rc.d 2>/dev/null`
|
||||
if [ -z $updaterc ]; then
|
||||
$installdir/bin/setConfig -d Installation systemConfig updaterc
|
||||
|
||||
update-rc.d columnstore defaults 99 > /dev/null 2>&1
|
||||
else
|
||||
echo ""
|
||||
echo "Package 'chkconfig' or 'update-rc.d' not installed, contact your sysadmin if you want to setup to autostart for columnstore"
|
||||
echo "Package 'systemctl', 'chkconfig' or 'update-rc.d' not installed, contact your sysadmin if you want to setup to autostart for columnstore"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#setup MariaDB Columnstore system logging
|
||||
|
@ -79,7 +79,7 @@ chmod -R og-rw $mysql_datadir/mysql
|
||||
# Change permissions again to fix any new files.
|
||||
chown -R $user.$user $installdir/mysql
|
||||
|
||||
test -e /etc/init.d/mysql-Columnstore || cp $installdir/mysql/mysql-Columnstore /etc/init.d >/dev/null 2>&1
|
||||
#test -e /etc/init.d/mysql-Columnstore || cp $installdir/mysql/mysql-Columnstore /etc/init.d >/dev/null 2>&1
|
||||
|
||||
if [ -f $installdir/lib/libcalmysql.so.1.0.0 ]; then
|
||||
libcalmysql=$installdir/lib/libcalmysql.so.1.0.0
|
||||
|
@ -35,9 +35,7 @@ done
|
||||
|
||||
#stop services
|
||||
$installdir/bin/columnstore stop > /dev/null 2>&1
|
||||
if test -f /etc/init.d/columnstore-Mysql ; then
|
||||
$installdir/myql/columnstore-Mysql stop > /dev/null 2>&1
|
||||
fi
|
||||
$installdir/myql/columnstore-Mysql stop > /dev/null 2>&1
|
||||
|
||||
if [ $installdir == "/usr/local/mariadb/columnstore" ]; then
|
||||
# remove library config file
|
||||
@ -128,13 +126,27 @@ if [ -x $installdir/bin/syslogSetup.sh ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -x /sbin/chkconfig ]; then
|
||||
/sbin/chkconfig columnstore off > /dev/null 2>&1
|
||||
/sbin/chkconfig --del columnstore > /dev/null 2>&1
|
||||
elif [ -x /usr/sbin/update-rc.d ]; then
|
||||
/usr/sbin/update-rc.d -f columnstore remove > /dev/null 2>&1
|
||||
#remove the start service command
|
||||
systemctl=`which systemctl 2>/dev/null`
|
||||
if [ -z $systemctl ]; then
|
||||
|
||||
systemctl disable columnstore
|
||||
else
|
||||
chkconfig=`which chkconfig 2>/dev/null`
|
||||
if [ -z $chkconfig ]; then
|
||||
|
||||
chkconfig columnstore off > /dev/null 2>&1
|
||||
chkconfig --del columnstore > /dev/null 2>&1
|
||||
else
|
||||
updaterc=`which update-rc.d 2>/dev/null`
|
||||
if [ -z $updaterc ]; then
|
||||
|
||||
update-rc.d -f columnstore remove > /dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ $quiet != 1 ]; then
|
||||
#make copy of Columnstore.xml
|
||||
/bin/cp -f $installdir/etc/Columnstore.xml $installdir/etc/Columnstore.xml.rpmsave > /dev/null 2>&1
|
||||
|
@ -59,10 +59,11 @@ fi
|
||||
|
||||
#if none running, check installed
|
||||
if [ "$daemon" = "nodaemon" ]; then
|
||||
if [ -f /etc/init.d/syslog ]; then
|
||||
|
||||
if [ -f /etc/syslog.conf ]; then
|
||||
daemon="syslog"
|
||||
/etc/init.d/syslog start > /dev/null 2>&1
|
||||
elif [ -f /etc/init.d/rsyslog ]; then
|
||||
elif [ -f /etc/rsyslog.conf ]; then
|
||||
daemon="rsyslog"
|
||||
/etc/init.d/rsyslog start > /dev/null 2>&1
|
||||
elif [ -f /etc/init.d/syslog-ng ]; then
|
||||
|
@ -8037,9 +8037,9 @@ namespace oam
|
||||
system(cmd.c_str());
|
||||
|
||||
if (user == 0)
|
||||
cmd = "/etc/init.d/" + systemlog + " " + action + " > /dev/null 2>&1";
|
||||
cmd = "/service " + systemlog + " " + action + " > /dev/null 2>&1";
|
||||
else
|
||||
cmd = "sudo /etc/init.d/" + systemlog + " " + action + " > /dev/null 2>&1";
|
||||
cmd = "sudo service" + systemlog + " " + action + " > /dev/null 2>&1";
|
||||
}
|
||||
// take action on syslog service
|
||||
writeLog("syslogAction cmd: " + cmd, LOG_TYPE_DEBUG );
|
||||
@ -8240,12 +8240,17 @@ namespace oam
|
||||
// retry failure
|
||||
writeLog("glusterctl: GLUSTER_WHOHAS: failure, retrying (restarting gluster) " + msg, LOG_TYPE_ERROR );
|
||||
|
||||
string cmd = "/etc/init.d/glusterd restart > /dev/null 2>&1";
|
||||
string cmd = "service glusterd restart > /dev/null 2>&1";
|
||||
if (user != 0)
|
||||
cmd = "sudo " + cmd;
|
||||
|
||||
system(cmd.c_str());
|
||||
|
||||
string cmd = "systemctrl restart glusterd > /dev/null 2>&1";
|
||||
if (user != 0)
|
||||
cmd = "sudo " + cmd;
|
||||
|
||||
system(cmd.c_str());
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
|
@ -1647,8 +1647,8 @@ void pingDeviceThread()
|
||||
|
||||
processManager.setSystemState(oam::BUSY_INIT);
|
||||
|
||||
string cmd = "/etc/init.d/glusterd restart > /dev/null 2>&1";
|
||||
system(cmd.c_str());
|
||||
//string cmd = "/etc/init.d/glusterd restart > /dev/null 2>&1";
|
||||
//system(cmd.c_str());
|
||||
|
||||
//send notification
|
||||
oam.sendDeviceNotification(moduleName, MODULE_DOWN);
|
||||
|
Reference in New Issue
Block a user