mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Core/Misc: Add console option to update databases only
Add "--update-databases-only" console argument to stop worldserver execution after having updated all databases (if specified in config file)
(cherry picked from commit 92bf5b1ba7)
This commit is contained in:
@@ -221,6 +221,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)
|
||||
@@ -641,6 +644,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");
|
||||
|
||||
Reference in New Issue
Block a user