diff --git a/frontend/locales/english.lng b/frontend/locales/english.lng index c813a3b..6907aee 100644 --- a/frontend/locales/english.lng +++ b/frontend/locales/english.lng @@ -84,3 +84,4 @@ list-status-stopped; Stopped list-status-suspended; Suspended reinstall-warning; I understand that by reinstalling my VPS, all data on the VPS is permanently lost and cannot be recovered. There will be no further confirmations, after clicking the Reinstall button the reinstallation process cannot be aborted. +reinstall-patience; (be patient; this may take a while) diff --git a/frontend/module.vps.reinstall.php b/frontend/module.vps.reinstall.php index 0796f66..6a56544 100644 --- a/frontend/module.vps.reinstall.php +++ b/frontend/module.vps.reinstall.php @@ -34,6 +34,7 @@ if(isset($_POST['submit'])) $sContainer->uTemplateId = $sTemplate->sId; $sContainer->InsertIntoDatabase(); $sContainer->Reinstall(); + $sContainer->Start(); $err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_SUCCESS, "Reinstallation succeeded!", "Your VPS was successfully reinstalled."); $sPageContents .= $err->Render(); @@ -43,6 +44,11 @@ if(isset($_POST['submit'])) $err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_ERROR, "Reinstallation failed", "Something went wrong during the reinstallation of your VPS. Please try again. If the reinstallation fails again, please contact support."); $sPageContents .= $err->Render(); } + catch (ContainerStartException $e) + { + $err = new CPHPErrorHandler(CPHP_ERRORHANDLER_TYPE_WARNING, "Failed to start", "The VPS was successfully reinstalled, but it could not be started. If the issue persists, please contact support."); + $sPageContents .= $err->Render(); + } } else { diff --git a/frontend/templates/vps.reinstall.tpl b/frontend/templates/vps.reinstall.tpl index c198a24..986e619 100644 --- a/frontend/templates/vps.reinstall.tpl +++ b/frontend/templates/vps.reinstall.tpl @@ -18,5 +18,6 @@
+  <%!reinstall-patience>