- Added a check to see if the group "ispapps" exists.
| | |
| | | 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 |
| | |
| | | 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 |
| | |
| | | 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 |
| | |
| | | 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 |