2013-09-09 17:34:39 +02:00
|
|
|
#
|
|
|
|
class mysql::server::service {
|
2015-02-27 18:54:00 +01:00
|
|
|
$options = $mysql::server::options
|
2013-09-09 17:34:39 +02:00
|
|
|
|
2013-09-13 19:04:42 +02:00
|
|
|
if $mysql::server::real_service_manage {
|
2014-08-21 17:44:27 +02:00
|
|
|
if $mysql::server::real_service_enabled {
|
|
|
|
$service_ensure = 'running'
|
|
|
|
} else {
|
|
|
|
$service_ensure = 'stopped'
|
2013-09-09 17:34:39 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-02-27 18:54:00 +01:00
|
|
|
file { $options['mysqld']['log-error']:
|
2014-10-07 23:28:00 +02:00
|
|
|
ensure => present,
|
|
|
|
owner => 'mysql',
|
|
|
|
group => 'mysql',
|
2014-08-21 17:44:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
service { 'mysqld':
|
|
|
|
ensure => $service_ensure,
|
|
|
|
name => $mysql::server::service_name,
|
|
|
|
enable => $mysql::server::real_service_enabled,
|
|
|
|
provider => $mysql::server::service_provider,
|
2015-01-11 05:35:10 +01:00
|
|
|
require => [ File['mysql-config-file'], Package['mysql-server'] ]
|
2014-08-21 17:44:27 +02:00
|
|
|
}
|
|
|
|
|
2013-09-09 17:34:39 +02:00
|
|
|
}
|