diff --git a/scm-webapp/src/main/java/sonia/scm/update/MigrationWizardServlet.java b/scm-webapp/src/main/java/sonia/scm/update/MigrationWizardServlet.java index 415a05fe2b..99833c57cc 100644 --- a/scm-webapp/src/main/java/sonia/scm/update/MigrationWizardServlet.java +++ b/scm-webapp/src/main/java/sonia/scm/update/MigrationWizardServlet.java @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ - + package sonia.scm.update; import com.github.mustachejava.DefaultMustacheFactory; @@ -143,14 +143,13 @@ class MigrationWizardServlet extends HttpServlet { ); Map model = Collections.singletonMap("contextPath", req.getContextPath()); - - respondWithTemplate(resp, model, "templates/repository-migration-restart.mustache"); - ThreadContext.bind(new Subject.Builder(new DefaultSecurityManager()).authenticated(false).buildSubject()); if (restarter.isSupported()) { + respondWithTemplate(resp, model, "templates/repository-migration-restart.mustache"); restarter.restart(MigrationWizardServlet.class, "wrote migration data"); } else { + respondWithTemplate(resp, model, "templates/repository-migration-manual-restart.mustache"); LOG.error("Restarting is not supported on this platform."); LOG.error("Please do a manual restart"); } diff --git a/scm-webapp/src/main/resources/templates/repository-migration-manual-restart.mustache b/scm-webapp/src/main/resources/templates/repository-migration-manual-restart.mustache new file mode 100644 index 0000000000..a0d2fd1a96 --- /dev/null +++ b/scm-webapp/src/main/resources/templates/repository-migration-manual-restart.mustache @@ -0,0 +1,12 @@ +{{ + The migration is prepared and gets executed after scm-manager is restarted.
+ Please restart your scm-manager instance. +

+ {{/content}} + +{{/layout}}