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

@@ -82,6 +82,7 @@ $installdir/bin/clearShm > /dev/null 2>&1
rm -f /etc/cron.d/ps > /dev/null 2>&1 rm -f /etc/cron.d/ps > /dev/null 2>&1
rm -f /etc/pscollect > /dev/null 2>&1 rm -f /etc/pscollect > /dev/null 2>&1
/etc/init.d/crond reload > /dev/null 2>&1 /etc/init.d/crond reload > /dev/null 2>&1
systemctl reload crond.service > /dev/null 2>&1
# delete tmp files # delete tmp files
rm -f $installdir/local/*.calpont rm -f $installdir/local/*.calpont

View File

@@ -169,7 +169,9 @@ if [ ! -z "$syslog_conf" ] ; then
pkill -hup syslogd > /dev/null 2>&1 pkill -hup syslogd > /dev/null 2>&1
pkill -hup syslog-ng > /dev/null 2>&1 pkill -hup syslog-ng > /dev/null 2>&1
pkill -hup rsyslogd > /dev/null 2>&1
/etc/init.d/rsyslog restart > /dev/null 2>&1 /etc/init.d/rsyslog restart > /dev/null 2>&1
systemctl restart rsyslog.service > /dev/null 2>&1
fi fi
} }
@@ -201,6 +203,7 @@ if [ ! -z "$syslog_conf" ] ; then
pkill -hup syslogd > /dev/null 2>&1 pkill -hup syslogd > /dev/null 2>&1
pkill -hup syslog-ng > /dev/null 2>&1 pkill -hup syslog-ng > /dev/null 2>&1
/etc/init.d/rsyslog restart > /dev/null 2>&1 /etc/init.d/rsyslog restart > /dev/null 2>&1
systemctl restart rsyslog.service > /dev/null 2>&1
$installdir/bin/setConfig -d Installation SystemLogConfigFile "unassigned" $installdir/bin/setConfig -d Installation SystemLogConfigFile "unassigned"

View File

@@ -7853,6 +7853,13 @@ namespace oam
{ {
int user; int user;
user = getuid(); 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) if (user == 0)
cmd = "/etc/init.d/" + systemlog + " " + action + " > /dev/null 2>&1"; cmd = "/etc/init.d/" + systemlog + " " + action + " > /dev/null 2>&1";
else else

View File

@@ -4163,6 +4163,8 @@ int ProcessMonitor::changeCrontab()
// restart the service to make sure it running // restart the service to make sure it running
system("/etc/init.d/crond start > /dev/null 2>&1"); system("/etc/init.d/crond start > /dev/null 2>&1");
system("/etc/init.d/crond reload > /dev/null 2>&1"); system("/etc/init.d/crond reload > /dev/null 2>&1");
system("systemctl start crond.service > /dev/null 2>&1");
system("systemctl reload crond.service > /dev/null 2>&1");
return API_SUCCESS; return API_SUCCESS;
} }
@@ -4259,6 +4261,8 @@ int ProcessMonitor::changeTransactionLog()
// restart the service to make sure it running // restart the service to make sure it running
system("/etc/init.d/crond start > /dev/null 2>&1"); system("/etc/init.d/crond start > /dev/null 2>&1");
system("/etc/init.d/crond reload > /dev/null 2>&1"); system("/etc/init.d/crond reload > /dev/null 2>&1");
system("systemctl start crond.service > /dev/null 2>&1");
system("systemctl reload crond.service > /dev/null 2>&1");
return API_SUCCESS; return API_SUCCESS;
} }
@@ -4296,6 +4300,9 @@ void ProcessMonitor::setTransactionLog(bool action)
log.writeLog(__LINE__, "Start and reload crond", LOG_TYPE_DEBUG); log.writeLog(__LINE__, "Start and reload crond", LOG_TYPE_DEBUG);
system("/etc/init.d/crond start > /dev/null 2>&1"); system("/etc/init.d/crond start > /dev/null 2>&1");
system("/etc/init.d/crond reload > /dev/null 2>&1"); system("/etc/init.d/crond reload > /dev/null 2>&1");
system("systemctl start crond.service > /dev/null 2>&1");
system("systemctl reload crond.service > /dev/null 2>&1");
} }
/****************************************************************************************** /******************************************************************************************

View File

@@ -121,7 +121,7 @@ send_user "\n"
# install InfiniDB package # install InfiniDB package
# #
send_user "Install New InfiniDB Packages " send_user "Install New InfiniDB Packages "
send "ssh $USERNAME@$SERVER ' rpm -iv --nodeps $CALPONTPACKAGE1 $CALPONTPACKAGE2 $CALPONTPACKAGE3 $MYSQLPACKAGE $MYSQLDPACKAGE'\n" send "ssh $USERNAME@$SERVER ' rpm -ivh --nodeps infinidb-mariadb*'\n"
expect -re "word: " expect -re "word: "
# password for ssh # password for ssh
send "$PASSWORD\n" send "$PASSWORD\n"

View File

@@ -111,7 +111,7 @@ sleep 5
# #
set timeout 160 set timeout 160
send_user "Install New InfiniDB Packages " send_user "Install New InfiniDB Packages "
send "ssh $USERNAME@$SERVER ' rpm -ivh --nodeps $CALPONTPACKAGE1 $CALPONTPACKAGE2 $CALPONTPACKAGE3'\n" send "ssh $USERNAME@$SERVER ' rpm -ivh --nodeps infinidb-mariadb*'\n"
expect -re "word: " expect -re "word: "
# password for ssh # password for ssh
send "$PASSWORD\n" send "$PASSWORD\n"