Commit 4cb78174 authored by mh's avatar mh
Browse files

fix run_gid_name "mess"

run_gid_name should per default be the same as the group for the
sftponly user. However, as can now set that one, we should be detect
if a groupname is set and use that one for the run_gid_name and not
as by default the $name.
parent e05b75d5
......@@ -29,7 +29,6 @@ define webhosting::common(
$run_uid = 'absent',
$run_uid_name = 'absent',
$run_gid = 'absent',
$run_gid_name = 'absent',
$nagios_check = 'ensure',
$nagios_check_domain = 'absent',
$nagios_check_url = '/',
......@@ -60,12 +59,6 @@ define webhosting::common(
} else {
$real_run_uid_name = $run_uid_name
}
# not yet used below
# if ($run_gid_name == 'absent'){
# $real_run_gid_name = $real_run_uid_name
# } else {
# $real_run_gid_name = $run_gid_name
# }
if ($user_provider == 'local') and ($user_access == 'sftp') {
user::sftp_only{"${real_uid_name}":
ensure => $ensure,
......
......@@ -83,7 +83,6 @@ define webhosting::php::drupal(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
run_gid_name => $run_gid_name,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......@@ -149,7 +148,10 @@ define webhosting::php::drupal(
$real_run_uid_name = $run_uid_name
}
if ($run_gid_name == 'absent'){
$real_run_gid_name = $name
$real_run_gid_name = $gid_name ? {
'absent' => $name,
default => $gid_name
}
} else {
$real_run_gid_name = $run_gid_name
}
......
......@@ -82,7 +82,6 @@ define webhosting::php::gallery2(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
run_gid_name => $run_gid_name,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......@@ -152,7 +151,10 @@ define webhosting::php::gallery2(
$real_run_uid_name = $run_uid_name
}
if ($run_gid_name == 'absent'){
$real_run_gid_name = $name
$real_run_gid_name = $gid_name ? {
'absent' => $name,
default => $gid_name
}
} else {
$real_run_gid_name = $run_gid_name
}
......
......@@ -82,7 +82,6 @@ define webhosting::php::joomla(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
run_gid_name => $run_gid_name,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......@@ -147,7 +146,10 @@ define webhosting::php::joomla(
$real_run_uid_name = $run_uid_name
}
if ($run_gid_name == 'absent'){
$real_run_gid_name = $name
$real_run_gid_name = $gid_name ? {
'absent' => $name,
default => $gid_name
}
} else {
$real_run_gid_name = $run_gid_name
}
......
......@@ -90,7 +90,6 @@ define webhosting::php::mediawiki(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
run_gid_name => $run_gid_name,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......@@ -142,7 +141,10 @@ define webhosting::php::mediawiki(
$real_run_uid_name = $run_uid_name
}
if ($run_gid_name == 'absent'){
$real_run_gid_name = $name
$real_run_gid_name = $gid_name ? {
'absent' => $name,
default => $gid_name
}
} else {
$real_run_gid_name = $run_gid_name
}
......
......@@ -82,7 +82,6 @@ define webhosting::php::silverstripe(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
run_gid_name => $run_gid_name,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......@@ -147,7 +146,10 @@ define webhosting::php::silverstripe(
$real_run_uid_name = $run_uid_name
}
if ($run_gid_name == 'absent'){
$real_run_gid_name = $name
$real_run_gid_name = $gid_name ? {
'absent' => $name,
default => $gid_name
}
} else {
$real_run_gid_name = $run_gid_name
}
......
......@@ -82,7 +82,6 @@ define webhosting::php::simplemachine(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
run_gid_name => $run_gid_name,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......@@ -146,7 +145,10 @@ define webhosting::php::simplemachine(
$real_run_uid_name = $run_uid_name
}
if ($run_gid_name == 'absent'){
$real_run_gid_name = $name
$real_run_gid_name = $gid_name ? {
'absent' => $name,
default => $gid_name
}
} else {
$real_run_gid_name = $run_gid_name
}
......
......@@ -78,7 +78,6 @@ define webhosting::php::spip(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
run_gid_name => $run_gid_name,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......@@ -119,7 +118,10 @@ define webhosting::php::spip(
$real_run_uid_name = $run_uid_name
}
if ($run_gid_name == 'absent'){
$real_run_gid_name = $name
$real_run_gid_name = $gid_name ? {
'absent' => $name,
default => $gid_name
}
} else {
$real_run_gid_name = $run_gid_name
}
......
......@@ -82,7 +82,6 @@ define webhosting::php::typo3(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
run_gid_name => $run_gid_name,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......@@ -147,7 +146,10 @@ define webhosting::php::typo3(
$real_run_uid_name = $run_uid_name
}
if ($run_gid_name == 'absent'){
$real_run_gid_name = $name
$real_run_gid_name = $gid_name ? {
'absent' => $name,
default => $gid_name
}
} else {
$real_run_gid_name = $run_gid_name
}
......
......@@ -84,7 +84,6 @@ define webhosting::php::wordpress(
run_uid => $run_uid,
run_uid_name => $run_uid_name,
run_gid => $run_gid,
run_gid_name => $run_gid_name,
nagios_check => $nagios_check,
nagios_check_domain => $nagios_check_domain,
nagios_check_url => $nagios_check_url,
......@@ -148,7 +147,10 @@ define webhosting::php::wordpress(
$real_run_uid_name = $run_uid_name
}
if ($run_gid_name == 'absent'){
$real_run_gid_name = $name
$real_run_gid_name = $gid_name ? {
'absent' => $name,
default => $gid_name
}
} else {
$real_run_gid_name = $run_gid_name
}
......
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