init: Always configure gerrit.canonicalWebUrl

Gerrit has been requiring this field for several versions now,
but init did not configure it. Ensure there is a value set so
the server is not confused at runtime.

Change-Id: I72020df3cb7dcc0f7dd417415ca12e9f5dd823ae
This commit is contained in:
Shawn Pearce
2013-03-21 09:31:07 -07:00
parent e1f6f98362
commit 8281c7e865

View File

@@ -121,12 +121,7 @@ class InitHttpd implements InitStep {
} catch (URISyntaxException e) {
throw die("invalid httpd.listenUrl");
}
if (gerrit.get("canonicalWebUrl") != null //
|| (!proxy && ssl) //
|| getAuthType() == AuthType.OPENID) {
gerrit.string("Canonical URL", "canonicalWebUrl", uri.toString());
}
gerrit.string("Canonical URL", "canonicalWebUrl", uri.toString());
generateSslCertificate();
}