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