Skip to content

Commit

Permalink
Merge pull request Dadoum#14 from rkreutz/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Dadoum authored Feb 26, 2024
2 parents fab7bce + 1768205 commit 75128d5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ int main(string[] args) {

long timeoutMsecs = 3000;

bool skipServerStartup = false;

auto helpInformation = getopt(
args,
"n|host", format!"The hostname to bind to (default: %s)"(hostname), &hostname,
Expand All @@ -69,6 +71,7 @@ int main(string[] args) {
"timeout", format!"Timeout duration for Anisette V3 in milliseconds (default: %d)"(timeoutMsecs), &timeoutMsecs,
"private-key", "Path to the PEM-formatted private key file for HTTPS support (requires --cert-chain)", &certificateChainPath,
"cert-chain", "Path to the PEM-formatted certificate chain file for HTTPS support (requires --private-key)", &privateKeyPath,
"skip-server-startup", "If provided the server will skip HTTP binding and instead execute only initial configuration (if needed).", &skipServerStartup,
);

timeout = dur!"msecs"(timeoutMsecs);
Expand Down Expand Up @@ -153,6 +156,10 @@ int main(string[] args) {
log.info("Provisioning done!");
}

if (skipServerStartup) {
log.info("Configuration complete, shutting down.");
return 0;
}

// Create the router that will map the incoming requests to request handlers
auto router = new URLRouter();
Expand Down

0 comments on commit 75128d5

Please sign in to comment.