1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-26 05:02:32 +03:00

Make mysqld work without systemd

ColumnStore should now start/stop mysqld where the systemd service is
not available.
This commit is contained in:
Andrew Hutchings
2020-02-04 14:16:49 +00:00
parent 6cf6519019
commit 7df731a3a6
5 changed files with 109 additions and 17 deletions

View File

@@ -1514,8 +1514,17 @@ void ProcessMonitor::processMessage(messageqcpp::ByteStream msg, messageqcpp::IO
system(cmd.c_str());
cmd = "post-mysql-install >> " + tmpLogDir + "/rpminstall";
system(cmd.c_str());
cmd = "systemctl start mariadb.service > " + tmpLogDir + "/mysqldstart";
system(cmd.c_str());
int ret = system("systemctl cat mariadb.service > /dev/null 2>&1");
if (!ret)
{
cmd = "systemctl start mariadb.service > " + tmpLogDir + "/mysqldstart";
system(cmd.c_str());
}
else
{
cmd = "/usr/bin/mysqld_safe & > " + tmpLogDir + "/mysqldstart";
system(cmd.c_str());
}
string tmpFile = tmpLogDir + "/mysqldstart";
ifstream file (tmpFile.c_str());