| | |
| | | $command = "cp -rf ../server $install_dir"; |
| | | caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); |
| | | |
| | | //* Make a backup of the security settings |
| | | if(is_file('/usr/local/ispconfig/security/security_settings.ini')) copy('/usr/local/ispconfig/security/security_settings.ini','/usr/local/ispconfig/security/security_settings.ini~'); |
| | | |
| | | //* copy the ISPConfig security part |
| | | $command = 'cp -rf ../security '.$install_dir; |
| | | caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); |
| | | |
| | | //* Apply changed security_settings.ini values to new security_settings.ini file |
| | | if(is_file('/usr/local/ispconfig/security/security_settings.ini~')) { |
| | | $security_settings_old = ini_to_array(file_get_contents('/usr/local/ispconfig/security/security_settings.ini~')); |
| | | $security_settings_new = ini_to_array(file_get_contents('/usr/local/ispconfig/security/security_settings.ini')); |
| | | if(is_array($security_settings_new) && is_array($security_settings_old)) { |
| | | foreach($security_settings_new as $section => $sval) { |
| | | if(is_array($sval)) { |
| | | foreach($sval as $key => $val) { |
| | | if(isset($security_settings_old[$section]) && isset($security_settings_old[$section][$key])) { |
| | | $security_settings_new[$section][$key] = $security_settings_old[$section][$key]; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | file_put_contents('/usr/local/ispconfig/security/security_settings.ini',array_to_ini($security_settings_new)); |
| | | } |
| | | } |
| | | |
| | | //* Create a symlink, so ISPConfig is accessible via web |
| | | // Replaced by a separate vhost definition for port 8080 |