Commit be33e7ef authored by Mickaël Canévet's avatar Mickaël Canévet
Browse files

Merge pull request #78 from smithtrevor/systemd_restart_support

Systemd restart support
parents 32ebb5d2 cd2a6f8d
......@@ -7,6 +7,11 @@ class postfix::params {
default => undef,
}
$restart_cmd = $::operatingsystemmajrelease ? {
'7' => '/bin/systemctl reload postfix',
default => '/etc/init.d/postfix reload',
}
$mailx_package = 'mailx'
$master_os_template = "${module_name}/master.cf.redhat.erb"
......@@ -15,6 +20,8 @@ class postfix::params {
'Debian': {
$seltype = undef
$restart_cmd = '/etc/init.d/postfix reload'
$mailx_package = $::lsbdistcodename ? {
/sarge|etch|lenny/ => 'mailx',
default => 'bsd-mailx',
......@@ -26,6 +33,8 @@ class postfix::params {
'Suse': {
$seltype = undef
$restart_cmd = '/etc/init.d/postfix reload'
$mailx_package = 'mailx'
if $::operatingsystem != 'SLES' {
......
......@@ -3,6 +3,6 @@ class postfix::service {
ensure => running,
enable => true,
hasstatus => true,
restart => '/etc/init.d/postfix reload',
restart => $::postfix::params::restart_cmd,
}
}
......@@ -67,7 +67,7 @@ describe 'postfix' do
:ensure => 'running',
:enable => 'true',
:hasstatus => 'true',
:restart => '/etc/init.d/postfix reload'
:restart => '/bin/systemctl reload postfix'
) }
end
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment