config.php"); $continue = false; } else { $cwd = getcwd(); $config = str_replace("%privatePhpDirectory%", addslashes($PRIVATE_PHP_PATH), $config); $config = str_replace("%publicPhpDirectory%", addslashes($PUBLIC_PHP_PATH), $config); $config = str_replace("%nelSqlHostname%", addslashes($cfg['db']['shard']['host']), $config); $config = str_replace("%nelSqlPort%", addslashes($cfg['db']['shard']['port']), $config); $config = str_replace("%nelSqlUsername%", addslashes($cfg['db']['shard']['user']), $config); $config = str_replace("%nelSqlPassword%", addslashes($cfg['db']['shard']['pass']), $config); $config = str_replace("%nelDatabase%", addslashes($cfg['db']['shard']['name']), $config); $config = str_replace("%toolDatabase%", addslashes($cfg['db']['tool']['name']), $config); $config = str_replace("%amsDatabase%", addslashes($cfg['db']['web']['name']), $config); $config = str_replace("%amsLibDatabase%", addslashes($cfg['db']['lib']['name']), $config); $config = str_replace("%nelSetupPassword%", addslashes($NEL_SETUP_PASSWORD), $config); $config = str_replace("%nelDomainName%", addslashes($NEL_DOMAIN_NAME), $config); $config = str_replace("%nelSetupVersion%", addslashes($NEL_SETUP_VERSION), $config); $config = str_replace("%cryptKey%", addslashes($cfg['crypt']['key']), $config); $config = str_replace("%cryptKeyIMAP%", addslashes($SUPPORT_GROUP_IMAP_CRYPTKEY), $config); if ($NEL_SETUP_VERSION_CONFIGURED < 2) { $config = str_replace("%domainDatabase%", addslashes($NEL_DOMAIN_NAME . "_ring"), $config); } else { $config = str_replace("%domainDatabase%", addslashes($cfg['db']['ring']['name']), $config); } if ($NEL_SETUP_VERSION_CONFIGURED < 9) { $config = str_replace("%domainUsersDir%", addslashes("/home/nevrax/" . $NEL_DOMAIN_NAME . "/www"), $config); } else { $config = str_replace("%domainUsersDir%", addslashes($USERS_DIR), $config); } if (file_put_contents("config.php", $config)) { printalert("success", "Generated config.php"); } else { printalert("danger", "Cannot write to config.php"); $continue = false; } } } // Create config_user.php if it doesn't exist yet if ($continue && !file_exists("config_user.php")) { $configUser = file_get_contents($PRIVATE_PHP_PATH . "/setup/config/config_user.php"); if (!$configUser) { printalert("danger", "Cannot read config_user.php"); $continue = false; } else { if (file_put_contents("config_user.php", $configUser)) { printalert("success", "Copied config_user.php"); } else { printalert("danger", "Cannot write to config.php"); $continue = false; } } } if ($continue) { printalert("success", "Upgrade complete"); } ?>

Continue

Backup
It is strongly recommended to create a backup of your installation before proceeding with an upgrade!