Commit 1d034e1e authored by mh's avatar mh
Browse files

set run_uid_name for all itk modes

parent 9c44395f
......@@ -102,7 +102,7 @@ define webhosting::modperl(
mod_security => $mod_security,
}
case $run_mode {
'itk': {
'itk','proxy-itk','static-itk': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......
......@@ -127,7 +127,7 @@ define webhosting::passenger(
mod_security => $mod_security,
}
case $run_mode {
'itk': {
'itk','proxy-itk','static-itk': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......
......@@ -145,7 +145,7 @@ define webhosting::php(
mod_security => $mod_security,
}
case $run_mode {
'itk': {
'itk','proxy-itk','static-itk': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......
......@@ -149,7 +149,7 @@ define webhosting::php::drupal(
}
}
case $run_mode {
'itk': {
'itk','proxy-itk','static-itk': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......
......@@ -152,7 +152,7 @@ define webhosting::php::gallery2(
}
}
case $run_mode {
'itk': {
'itk','proxy-itk','static-itk': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......
......@@ -147,7 +147,7 @@ define webhosting::php::joomla(
}
}
case $run_mode {
'itk': {
'itk','proxy-itk','static-itk': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......
......@@ -142,7 +142,8 @@ define webhosting::php::mediawiki(
documentroot_write_mode => 0660,
}
if ($run_mode == 'itk') {
case $run_mode {
'itk','proxy-itk','static-itk': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......@@ -169,12 +170,14 @@ define webhosting::php::mediawiki(
documentroot_mode => 0640,
require => [ User::Sftp_only["${real_uid_name}"], User::Managed["${real_run_uid_name}"] ],
}
} else {
Apache::Vhost::Php::Mediawiki[$name]{
require => User::Sftp_only["${real_uid_name}"],
}
Mediawiki::Instance[$name]{
require => User::Sftp_only["${real_uid_name}"],
default: {
Apache::Vhost::Php::Mediawiki[$name]{
require => User::Sftp_only["${real_uid_name}"],
}
Mediawiki::Instance[$name]{
require => User::Sftp_only["${real_uid_name}"],
}
}
}
}
......
......@@ -147,7 +147,7 @@ define webhosting::php::silverstripe(
}
}
case $run_mode {
'itk': {
'itk','proxy-itk','static-itk': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......
......@@ -146,40 +146,43 @@ define webhosting::php::simplemachine(
mode => 400,
}
}
if ($run_mode == 'itk') {
if ($run_uid_name == 'absent'){
case $run_mode {
'itk','proxy-itk','static-itk': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
} else {
$real_run_uid_name = $run_uid_name
}
if ($run_gid_name == 'absent'){
$real_run_gid_name = $gid_name ? {
'absent' => $name,
default => $gid_name
}
} else {
$real_run_gid_name = $run_gid_name
}
Apache::Vhost::Php::Simplemachine[$name]{
documentroot_owner => $real_uid_name,
documentroot_group => $real_gid_name,
run_uid => $real_run_uid_name,
run_gid => $real_run_gid_name,
require => [ User::Sftp_only["${real_uid_name}"], User::Managed["${real_run_uid_name}"] ],
}
if ($git_repo != 'absent') and ($ensure != 'absent') {
Git::Clone["git_clone_$name"]{
}
if ($run_gid_name == 'absent'){
$real_run_gid_name = $gid_name ? {
'absent' => $name,
default => $gid_name
}
} else {
$real_run_gid_name = $run_gid_name
}
Apache::Vhost::Php::Simplemachine[$name]{
documentroot_owner => $real_uid_name,
documentroot_group => $real_gid_name,
run_uid => $real_run_uid_name,
run_gid => $real_run_gid_name,
require => [ User::Sftp_only["${real_uid_name}"], User::Managed["${real_run_uid_name}"] ],
}
if ($git_repo != 'absent') and ($ensure != 'absent') {
Git::Clone["git_clone_$name"]{
require => [ User::Sftp_only["${real_uid_name}"], User::Managed["${real_run_uid_name}"] ],
}
}
}
} else {
Apache::Vhost::Php::Simplemachine[$name]{
require => User::Sftp_only["${real_uid_name}"],
}
if ($git_repo != 'absent') and ($ensure != 'absent') {
Git::Clone["git_clone_$name"]{
default: {
Apache::Vhost::Php::Simplemachine[$name]{
require => User::Sftp_only["${real_uid_name}"],
}
if ($git_repo != 'absent') and ($ensure != 'absent') {
Git::Clone["git_clone_$name"]{
require => User::Sftp_only["${real_uid_name}"],
}
}
}
}
}
......@@ -119,7 +119,7 @@ define webhosting::php::spip(
mod_security => $mod_security,
}
case $run_mode {
'itk': {
'itk','proxy-itk','static-itk': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......
......@@ -147,7 +147,7 @@ define webhosting::php::typo3(
}
}
case $run_mode {
'itk': {
'itk','proxy-itk','static-itk': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......
......@@ -148,7 +148,8 @@ define webhosting::php::wordpress(
mode => 400,
}
}
if ($run_mode == 'itk') {
case $run_mode {
'itk','proxy-itk','static-itk': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......@@ -174,14 +175,16 @@ define webhosting::php::wordpress(
require => [ User::Sftp_only["${real_uid_name}"], User::Managed["${real_run_uid_name}"] ],
}
}
} else {
Apache::Vhost::Php::Wordpress[$name]{
require => User::Sftp_only["${real_uid_name}"],
}
if ($git_repo != 'absent') and ($ensure != 'absent') {
Git::Clone["git_clone_$name"]{
default: {
Apache::Vhost::Php::Wordpress[$name]{
require => User::Sftp_only["${real_uid_name}"],
}
if ($git_repo != 'absent') and ($ensure != 'absent') {
Git::Clone["git_clone_$name"]{
require => User::Sftp_only["${real_uid_name}"],
}
}
}
}
}
......
Markdown is supported
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