| | |
| | | if(substr($socket_dir,-1) != '/') $socket_dir .= '/'; |
| | | if(!is_dir($socket_dir)) exec('mkdir -p '.$socket_dir); |
| | | $fpm_socket = $socket_dir.'apps.sock'; |
| | | $cgi_socket = escapeshellcmd($conf['nginx']['cgi_socket']); |
| | | |
| | | $content = str_replace('{apps_vhost_ip}', $apps_vhost_ip, $content); |
| | | $content = str_replace('{apps_vhost_port}', $conf['web']['apps_vhost_port'], $content); |
| | |
| | | $content = str_replace('{apps_vhost_servername}', $apps_vhost_servername, $content); |
| | | //$content = str_replace('{fpm_port}', ($conf['nginx']['php_fpm_start_port']+1), $content); |
| | | $content = str_replace('{fpm_socket}', $fpm_socket, $content); |
| | | $content = str_replace('{cgi_socket}', $cgi_socket, $content); |
| | | |
| | | wf($vhost_conf_dir.'/apps.vhost', $content); |
| | | |
| | |
| | | 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 |