From b4e3e973297db456f0ba8d7fdb8bbfc9c8426ea7 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 13 Jul 2023 13:31:06 +0100 Subject: Simplify the codes that InspIRCd can exit with. The custom codes that InspIRCd exits with are not very useful and can confuse init systems like systemd which assume that certain exit codes mean certain things. INSPIRCD_BINARY_EXIT was a workaround for this in v3 but considering thatsers have to check the logs anyway so we may as well just use EXIT_SUCCESS and EXIT_FAILURE. --- src/modulemanager.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/modulemanager.cpp') diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp index b0ac5f711..9a7ebfe3c 100644 --- a/src/modulemanager.cpp +++ b/src/modulemanager.cpp @@ -28,7 +28,6 @@ #include "inspircd.h" #include "dynamic.h" -#include "exitcodes.h" bool ModuleManager::Load(const std::string& modname, bool defer) { @@ -150,14 +149,14 @@ void ModuleManager::LoadCoreModules(std::map& servicem fmt::println(""); fmt::println("[{}] {}", fmt::styled("*", fmt::emphasis::bold | fmt::fg(fmt::terminal_color::red)), LastError()); fmt::println(""); - ServerInstance->Exit(EXIT_STATUS_MODULE); + ServerInstance->Exit(EXIT_FAILURE); } } } catch (const std::filesystem::filesystem_error& err) { fmt::println("failed: {}", err.what()); - ServerInstance->Exit(EXIT_STATUS_MODULE); + ServerInstance->Exit(EXIT_FAILURE); } fmt::println(""); -- cgit v1.3.1-10-gc9f91