Add --init option to Daemon to initialize site on daemon start.
The --init option will also upgrade an already existing site and
is processed in non-interactive (batch) mode.
This is a rework of the automatic schema upgrade feature that was
introduced with de980a4ddd and is
reverted with this change. Running init is more generic and also
supports initialization of a new site on daemon start.
Besides automatic upgrade, this feature also makes developers work
more comfortable as it can eliminate running init as a separate
step before running the daemon.
Change-Id: I6a245172529812e42e573413f41424a0497e9539
This commit is contained in:
@@ -51,6 +51,13 @@ public abstract class SiteProgram extends AbstractProgram {
|
||||
@Option(name = "--site-path", aliases = {"-d"}, usage = "Local directory containing site data")
|
||||
private File sitePath = new File(".");
|
||||
|
||||
protected SiteProgram() {
|
||||
}
|
||||
|
||||
protected SiteProgram(File sitePath) {
|
||||
this.sitePath = sitePath;
|
||||
}
|
||||
|
||||
/** @return the site path specified on the command line. */
|
||||
protected File getSitePath() {
|
||||
File path = sitePath.getAbsoluteFile();
|
||||
|
||||
Reference in New Issue
Block a user