Skip to content

Commit

Permalink
Core/Misc: Add console option to update databases only
Browse files Browse the repository at this point in the history
Add "--update-databases-only" console argument to stop worldserver execution after having updated all databases (if specified in config file)

(cherry picked from commit 92bf5b1)
  • Loading branch information
jackpoz authored and Shauren committed May 13, 2020
1 parent 7e18255 commit d3782c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server/worldserver/Main.cpp
Expand Up @@ -219,6 +219,9 @@ extern int main(int argc, char** argv)
if (!StartDB())
return 1;

if (vm.count("update-databases-only"))
return 0;

std::shared_ptr<void> dbHandle(nullptr, [](void*) { StopDB(); });

// Set server offline (not connectable)
Expand Down Expand Up @@ -603,6 +606,7 @@ variables_map GetConsoleArguments(int argc, char** argv, fs::path& configFile, s
("version,v", "print version build info")
("config,c", value<fs::path>(&configFile)->default_value(fs::absolute(_TRINITY_CORE_CONFIG)),
"use <arg> as configuration file")
("update-databases-only,u", "updates databases only")
;
#ifdef _WIN32
options_description win("Windows platform specific options");
Expand Down

0 comments on commit d3782c2

Please sign in to comment.