use "systemctl enable <service>" for RHEL 7

This commit is contained in:
Ralf Becker 2014-10-07 11:37:29 +00:00
parent cf96d4e82d
commit 7d7b4cd7bc

View File

@ -148,9 +148,10 @@ function set_distro_defaults($distro=null)
// some MySQL packages (mysql.com, MariaDB, ...) use "mysql" as service name instead of RH default "mysqld"
if (file_exists('/usr/bin/systemctl')) // RHEL 7
{
$config['autostart_db'] = $config['autostart_webserver'] = '';
$config['start_db'] = '/usr/bin/systemctl %s mariadb';
$config['autostart_db'] = build_cmd('start_db', 'enable');
$config['start_webserver'] = '/usr/bin/systemctl %s httpd';
$config['autostart_webserver'] = build_cmd('start_webserver', 'enable');
}
elseif (!file_exists('/etc/init.d/mysqld') && file_exists('/etc/init.d/mysql'))
{