From fa15ea2567ef4df086deba5e6f1b5a250dee996a Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sat, 29 Jan 2022 14:55:44 +0100 Subject: [PATCH] ./unrealircd hot-patch: now that we have rehash output and status codes in 6.0.2+ we can inform the user whether the rehash actually succeeded or not. This was already shown in the output, but we now also change the last few lines of output to make very clear if the rehash failed that the currently running UnrealIRCd is not patched. --- unrealircd.in | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/unrealircd.in b/unrealircd.in index 1c47a4220..0f8772ba2 100644 --- a/unrealircd.in +++ b/unrealircd.in @@ -259,8 +259,15 @@ elif [ "$1" = "hot-patch" -o "$1" = "cold-patch" ] ; then cd @SCRIPTDIR@ if [ "$1" = "hot-patch" ]; then echo "Patch applied successfully and installed. Rehashing your IRCd..." - ./unrealircd rehash - echo "Done! All should be good now." + if ./unrealircd rehash; then + echo "Patch installed and server rehashed correctly. All should be good now!" + else + echo "Patching the source code and recompiling succeeded," + echo "however rehashing the current UnrealIRCd process FAILED" + echo "so it is NOT running the patched code yet." + echo "IMPORTANT: Check error output above!" + exit 1 + fi else echo "Patch applied successfully. You must now restart your IRC server." fi