Skip to content

Commit

Permalink
Merge pull request #558 from paramite/manage_service
Browse files Browse the repository at this point in the history
Fixes manage_service feature
  • Loading branch information
igalic committed Sep 10, 2014
2 parents f8dca35 + 293d35d commit fbef97d
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions manifests/server/service.pp
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
#
class mysql::server::service {

if $mysql::server::real_service_enabled {
$service_ensure = 'running'
} else {
$service_ensure = 'stopped'
}

if $mysql::server::real_service_manage {
file { $mysql::params::log_error:
owner => 'mysql',
group => 'mysql',
}
service { 'mysqld':
ensure => $service_ensure,
name => $mysql::server::service_name,
enable => $mysql::server::real_service_enabled,
provider => $mysql::server::service_provider,
if $mysql::server::real_service_enabled {
$service_ensure = 'running'
} else {
$service_ensure = 'stopped'
}
}

file { $mysql::params::log_error:
owner => 'mysql',
group => 'mysql',
}

service { 'mysqld':
ensure => $service_ensure,
name => $mysql::server::service_name,
enable => $mysql::server::real_service_enabled,
provider => $mysql::server::service_provider,
}

}

0 comments on commit fbef97d

Please sign in to comment.