Skip to content

Commit

Permalink
Merge pull request #13 from cboecker/patch-2
Browse files Browse the repository at this point in the history
service enable at boot
  • Loading branch information
actionjack committed Sep 23, 2014
2 parents 55667e3 + 7c07e91 commit 136eb04
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
# Path to the mailcatcher program.
# The default is '/usr/local/bin'
#
# [*service_enable*]
# Enable Service at boot
# The default is false
#
# === Examples
#
# [*default*]
Expand Down Expand Up @@ -58,7 +62,8 @@
$smtp_port = $mailcatcher::params::smtp_port,
$http_ip = $mailcatcher::params::http_ip,
$http_port = $mailcatcher::params::http_port,
$mailcatcher_path = $mailcatcher::params::mailcatcher_path
$mailcatcher_path = $mailcatcher::params::mailcatcher_path,
$service_enable = $mailcatcher::params::service_enable,
) inherits mailcatcher::params {

class {'mailcatcher::package': } ->
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
$smtp_port = '1025'
$http_ip = '0.0.0.0'
$http_port = '1080'
$service_enable = false

case $::osfamily {
'Debian': {
Expand Down
3 changes: 2 additions & 1 deletion manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
class mailcatcher::service {
service {'mailcatcher':
ensure => 'running',
enable => $mailcatcher::service_enable,
provider => $mailcatcher::params::provider,
hasstatus => true,
hasrestart => true,
require => Class['mailcatcher::config'],
}
}
}

0 comments on commit 136eb04

Please sign in to comment.