Commit 6de5b3b9 authored by mh's avatar mh
Browse files

make it possible to have a default contact domain

parent 5eb5e69e
# the basics for the user_scripts
class webhosting::user_scripts {
class webhosting::user_scripts(
$default_contact_domain = false,
) {
require ::incron
# common stuff
......
......@@ -21,7 +21,7 @@ define webhosting::user_scripts::manage(
'web_writable' => [],
},
'global' => {
'default_contact' => true,
'contact' => true,
},
}
$user_scripts_options = deep_merge($default_options,$options)
......@@ -39,10 +39,14 @@ define webhosting::user_scripts::manage(
force => true;
}
if $user_scripts_options['global']['default_contact'] == true {
$hosting_contact = "security@${name}"
} elsif $user_scripts_options['global']['default_contact'] {
$hosting_contact = $user_scripts_options['global']['default_contact']
if $user_scripts_options['global']['contact'] == true {
if $webhosting::user_scripts::default_contact_domain {
$hosting_contact = "${name}@${webhosting::user_scripts::default_contact_domain}"
} else {
$hosting_contact = "security@${name}"
}
} elsif $user_scripts_options['global']['contact'] {
$hosting_contact = $user_scripts_options['global']['contact']
} else {
$hosting_contact = false
}
......
Supports Markdown
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