Fixed sendmail startup on CentOS.
This commit is contained in:
parent
3d214a726a
commit
f10fd7098e
1 changed files with 23 additions and 12 deletions
|
@ -11,6 +11,24 @@ class sendmail::common {
|
|||
name => [ "sendmail", "sendmail-cf", ],
|
||||
ensure => installed,
|
||||
}
|
||||
service { "sendmail":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
require => Package["sendmail"],
|
||||
}
|
||||
}
|
||||
|
||||
case $operatingsystem {
|
||||
"centos","fedora": {
|
||||
file { "/etc/sysconfig/sendmail":
|
||||
ensure => present,
|
||||
content => "DAEMON=no\nQUEUE=1h\n",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 0644,
|
||||
notify => Service["sendmail"],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -60,6 +78,10 @@ class sendmail::client inherits sendmail::common {
|
|||
default => "/etc/mail",
|
||||
},
|
||||
refreshonly => true,
|
||||
notify => $operatingsystem ? {
|
||||
"openbsd" => undef,
|
||||
default => Service["sendmail"],
|
||||
},
|
||||
}
|
||||
|
||||
file { "/etc/mail/submit.cf":
|
||||
|
@ -92,13 +114,8 @@ class sendmail::server inherits sendmail::common {
|
|||
centos,redhat: {
|
||||
$sendmail_ostype = "linux"
|
||||
$group = "root"
|
||||
file { "/etc/sysconfig/sendmail":
|
||||
ensure => present,
|
||||
File["/etc/sysconfig/sendmail"] {
|
||||
content => "DAEMON=yes\nQUEUE=1h\n",
|
||||
owner => "root",
|
||||
group => $group,
|
||||
mode => 0644,
|
||||
notify => Service["sendmail"],
|
||||
}
|
||||
} ubuntu: {
|
||||
fail("Operating system not supported.")
|
||||
|
@ -152,12 +169,6 @@ class sendmail::server inherits sendmail::common {
|
|||
notify => Service["sendmail"],
|
||||
}
|
||||
|
||||
service { "sendmail":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
require => File["/etc/mail/sendmail.cf"],
|
||||
}
|
||||
|
||||
exec { "newaliases":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
refreshonly => true,
|
||||
|
|
Loading…
Add table
Reference in a new issue