diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php index 66cddd88400206374a97a85d9b011070d9698e5a..6cb47183d95dc9ee13e73651e67630db4364de88 100644 --- a/install/dist/lib/fedora.lib.php +++ b/install/dist/lib/fedora.lib.php @@ -857,17 +857,23 @@ class installer_dist extends installer_base { if($conf['apache']['installed'] == true){ $command = 'usermod -a -G ispconfig '.$conf['apache']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); - $command = 'usermod -a -G ispapps '.$conf['apache']['user']; - caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + if(is_group('ispapps')){ + $command = 'usermod -a -G ispapps '.$conf['apache']['user']; + caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + } } if($conf['nginx']['installed'] == true){ $command = 'usermod -a -G ispconfig '.$conf['nginx']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); - // Allow the ispapps vhost access to /etc/squirrelmail - $command = 'usermod -a -G '.$conf['apache']['group'].' ispapps'; - caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); - $command = 'usermod -a -G ispapps '.$conf['nginx']['user']; - caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + if(is_user('ispapps')){ + // Allow the ispapps vhost access to /etc/squirrelmail + $command = 'usermod -a -G '.$conf['apache']['group'].' ispapps'; + caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + } + if(is_group('ispapps')){ + $command = 'usermod -a -G ispapps '.$conf['nginx']['user']; + caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + } } //* Make the shell scripts executable diff --git a/install/dist/lib/gentoo.lib.php b/install/dist/lib/gentoo.lib.php index 55626ec8c4c59b696a36de23c9e1743aa8729025..5aa5de18ff5c28339a69a73a4ac85d2abeee65cc 100644 --- a/install/dist/lib/gentoo.lib.php +++ b/install/dist/lib/gentoo.lib.php @@ -870,14 +870,18 @@ class installer extends installer_base if($conf['apache']['installed'] == true){ $command = 'usermod -a -G ispconfig '.$conf['apache']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); - $command = 'usermod -a -G ispapps '.$conf['apache']['user']; - caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + if(is_group('ispapps')){ + $command = 'usermod -a -G ispapps '.$conf['apache']['user']; + caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + } } if($conf['nginx']['installed'] == true){ $command = 'usermod -a -G ispconfig '.$conf['nginx']['user']; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); - $command = 'usermod -a -G ispapps '.$conf['nginx']['user']; - caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + if(is_group('ispapps')){ + $command = 'usermod -a -G ispapps '.$conf['nginx']['user']; + caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + } } //* Make the shell scripts executable diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php index fbf4c68e0476d3a72b35c0594d94d90ce80fd09e..22438cc59feede6296477d816c70825dada7bce7 100644 --- a/install/dist/lib/opensuse.lib.php +++ b/install/dist/lib/opensuse.lib.php @@ -894,14 +894,18 @@ class installer_dist extends installer_base { if($conf['apache']['installed'] == true){ $command = 'groupmod --add-user '.$conf['apache']['user'].' ispconfig'; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); - $command = 'groupmod --add-user '.$conf['apache']['user'].' ispapps'; - caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + if(is_group('ispapps')){ + $command = 'groupmod --add-user '.$conf['apache']['user'].' ispapps'; + caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + } } if($conf['nginx']['installed'] == true){ $command = 'groupmod --add-user '.$conf['nginx']['user'].' ispconfig'; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); - $command = 'groupmod --add-user '.$conf['nginx']['user'].' ispapps'; - caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + if(is_group('ispapps')){ + $command = 'groupmod --add-user '.$conf['nginx']['user'].' ispapps'; + caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + } } //* Make the shell scripts executable diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 6b1f4ee143667e3b2a7e71e584b5f16dfc991d43..fcd8673f638029bb5ff45f176f2843393fd68c34 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1752,14 +1752,18 @@ class installer_base { if($conf['apache']['installed'] == true){ $command = 'adduser '.$conf['apache']['user'].' ispconfig'; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); - $command = 'adduser '.$conf['apache']['user'].' ispapps'; - caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + if(is_group('ispapps')){ + $command = 'adduser '.$conf['apache']['user'].' ispapps'; + caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + } } if($conf['nginx']['installed'] == true){ $command = 'adduser '.$conf['nginx']['user'].' ispconfig'; caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); - $command = 'adduser '.$conf['nginx']['user'].' ispapps'; - caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + if(is_group('ispapps')){ + $command = 'adduser '.$conf['nginx']['user'].' ispapps'; + caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); + } } //* Make the shell scripts executable