1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-07 03:22:57 +03:00

add in the systemctl command for services

This commit is contained in:
david hill
2016-02-24 15:49:27 -06:00
parent e76bb8eba0
commit 95d872cf0e
6 changed files with 20 additions and 2 deletions

View File

@@ -7853,6 +7853,13 @@ namespace oam
{
int user;
user = getuid();
if (user == 0)
cmd = "systemctl " + action + " " + systemlog + ".service > /dev/null 2>&1";
else
cmd = "sudo systemctl " + action + " " + systemlog + ".service > /dev/null 2>&1";
system(cmd.c_str());
if (user == 0)
cmd = "/etc/init.d/" + systemlog + " " + action + " > /dev/null 2>&1";
else