diff --git a/manifests/init.pp b/manifests/init.pp index cbc968d..525509b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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*] @@ -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': } -> diff --git a/manifests/params.pp b/manifests/params.pp index 4037984..58f093c 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -5,6 +5,7 @@ $smtp_port = '1025' $http_ip = '0.0.0.0' $http_port = '1080' + $service_enable = false case $::osfamily { 'Debian': { diff --git a/manifests/service.pp b/manifests/service.pp index ac6f082..e01ecd1 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -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'], } -} \ No newline at end of file +}