Commit 83d08532 authored by mh's avatar mh
Browse files

introduce fpm as a possibele run_mode

parent 713f6b5c
......@@ -80,7 +80,7 @@ define webhosting::common(
include ::apache::sftponly
}
if $run_mode in ['fcgid','static'] {
if $run_mode in ['fpm','fcgid','static'] {
if ($user_access == 'sftp') {
if ($ensure != 'absent') {
User::Sftp_only[$real_uid_name]{
......@@ -89,11 +89,10 @@ define webhosting::common(
}
user::groups::manage_user{
"apache_in_${real_gid_name}":
group => $real_gid_name,
user => 'apache',
}
User::Groups::Manage_user["apache_in_${real_gid_name}"]{
ensure => $ensure,
ensure => $ensure,
group => $real_gid_name,
user => 'apache',
notify => Service['apache'],
}
if $ensure == 'present' {
User::Groups::Manage_user["apache_in_${real_gid_name}"]{
......@@ -102,9 +101,9 @@ define webhosting::common(
}
}
}
if $run_mode == 'fcgid' {
if $run_mode in ['fpm','fcgid'] {
if ($run_uid=='absent') and ($ensure != 'absent') {
fail("you need to define run_uid for ${name} on ${::fqdn} to use fcgid")
fail("you need to define run_uid for ${name} on ${::fqdn} to use fpm or fcgid")
}
$real_run_uid = $run_uid ? {
'iuid' => iuid($real_run_uid_name,'webhosting'),
......
......@@ -134,7 +134,7 @@ define webhosting::php(
mod_security => $mod_security,
}
case $run_mode {
'fcgid': {
'fpm','fcgid': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......
......@@ -136,7 +136,7 @@ define webhosting::php::drupal(
manage_cron => $manage_cron,
}
case $run_mode {
'fcgid': {
'fpm','fcgid': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......
......@@ -134,7 +134,7 @@ define webhosting::php::joomla(
manage_directories => $manage_directories,
}
case $run_mode {
'fcgid': {
'fpm','fcgid': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......
......@@ -170,7 +170,7 @@ define webhosting::php::mediawiki(
}
case $run_mode {
'fcgid': {
'fpm','fcgid': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......
......@@ -132,7 +132,7 @@ define webhosting::php::silverstripe(
manage_directories => $manage_directories,
}
case $run_mode {
'fcgid': {
'fpm','fcgid': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......
......@@ -136,7 +136,7 @@ define webhosting::php::simplemachine(
include ::webhosting::php::simplemachine::base
}
case $run_mode {
'fcgid': {
'fpm','fcgid': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......
......@@ -126,7 +126,7 @@ define webhosting::php::spip(
mod_security => $mod_security,
}
case $run_mode {
'fcgid': {
'fpm','fcgid': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......
......@@ -134,7 +134,7 @@ define webhosting::php::typo3(
manage_directories => $manage_directories,
}
case $run_mode {
'fcgid': {
'fpm','fcgid': {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......
......@@ -134,7 +134,7 @@ define webhosting::php::wordpress(
manage_directories => $manage_directories,
require => User::Sftp_only[$real_uid_name],
}
if $run_mode == 'fcgid' {
if $run_mode in ['fpm','fcgid'] {
if ($run_uid_name == 'absent'){
$real_run_uid_name = "${name}_run"
} else {
......@@ -170,7 +170,7 @@ define webhosting::php::wordpress(
before => File["${documentroot}/wp-content/uploads"],
}
}
if $run_mode == 'fcgid' {
if $run_mode in ['fpm','fcgid'] {
User::Managed[$real_run_uid_name] -> Wordpress::Instance[$name]
}
}
......
......@@ -9,7 +9,7 @@ define webhosting::utils::clone(
){
# create webdir
# for the cloning, $documentroot needs to be absent
if $run_mode == 'fcgid' {
if $run_mode in ['fpm','fcgid'] {
$req = [User::Sftp_only[$uid_name], User::Managed[$run_uid_name] ]
} else {
$req = User::Sftp_only[$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