From 4f8b995d89a4d6000c3e4a5733ce2521bf71aee0 Mon Sep 17 00:00:00 2001 From: Antz Date: Thu, 9 Jan 2020 07:21:13 +0000 Subject: [PATCH] Minor file changes --- .travis.yml | 2 +- contrib/soap/example.php | 2 +- doc/{SD2_SQL_guide.md => SD3_SQL_guide.md} | 0 ...SD2_Script_Layout.md => SD3_Script_Layout.md} | 0 doc/{SD2_Text-tables.md => SD3_Text-tables.md} | 0 src/tools/CMakeLists.txt | 2 +- src/tools/Extractor_projects/CMakeLists.txt | 2 +- .../shared/ExtractorCommon.cpp | 6 +++--- src/tools/restart-scripts/mangos.sh | 16 ++++++++++++++++ src/tools/restart-scripts/mangos_check.sh | 9 +++++++++ src/tools/restart-scripts/realmd.sh | 16 ++++++++++++++++ src/tools/restart-scripts/realmd_check.sh | 10 ++++++++++ 12 files changed, 58 insertions(+), 7 deletions(-) rename doc/{SD2_SQL_guide.md => SD3_SQL_guide.md} (100%) rename doc/{SD2_Script_Layout.md => SD3_Script_Layout.md} (100%) rename doc/{SD2_Text-tables.md => SD3_Text-tables.md} (100%) create mode 100644 src/tools/restart-scripts/mangos.sh create mode 100644 src/tools/restart-scripts/mangos_check.sh create mode 100644 src/tools/restart-scripts/realmd.sh create mode 100644 src/tools/restart-scripts/realmd_check.sh diff --git a/.travis.yml b/.travis.yml index 58e982b95..eb37eb8a2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,5 +42,5 @@ script: - test -d _build || mkdir _build - test -d _install || mkdir _install - cd _build - - cmake .. -DCMAKE_INSTALL_PREFIX=../_install -DSOAP=1 -DPLAYERBOTS=1 + - cmake .. -DCMAKE_INSTALL_PREFIX=../_install -DSOAP=1 -DPLAYERBOTS=0 - make -j4 diff --git a/contrib/soap/example.php b/contrib/soap/example.php index e89bb4a40..e113ecb2f 100644 --- a/contrib/soap/example.php +++ b/contrib/soap/example.php @@ -3,7 +3,7 @@ * MaNGOS is a full featured server for World of Warcraft, supporting * the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8 * - * Copyright (C) 2005-2019 MaNGOS project + * Copyright (C) 2005-2020 MaNGOS * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/doc/SD2_SQL_guide.md b/doc/SD3_SQL_guide.md similarity index 100% rename from doc/SD2_SQL_guide.md rename to doc/SD3_SQL_guide.md diff --git a/doc/SD2_Script_Layout.md b/doc/SD3_Script_Layout.md similarity index 100% rename from doc/SD2_Script_Layout.md rename to doc/SD3_Script_Layout.md diff --git a/doc/SD2_Text-tables.md b/doc/SD3_Text-tables.md similarity index 100% rename from doc/SD2_Text-tables.md rename to doc/SD3_Text-tables.md diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index 754e5ab72..095a151b2 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -1,7 +1,7 @@ # MaNGOS is a full featured server for World of Warcraft, supporting # the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8 # -# Copyright (C) 2005-2015 MaNGOS +# Copyright (C) 2005-2020 MaNGOS # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/tools/Extractor_projects/CMakeLists.txt b/src/tools/Extractor_projects/CMakeLists.txt index 9246ffe29..c544a93e2 100644 --- a/src/tools/Extractor_projects/CMakeLists.txt +++ b/src/tools/Extractor_projects/CMakeLists.txt @@ -1,7 +1,7 @@ # MaNGOS is a full featured server for World of Warcraft, supporting # the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8 # -# Copyright (C) 2005-2020 MaNGOS +# Copyright (C) 2005-2020 MaNGOS # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/tools/Extractor_projects/shared/ExtractorCommon.cpp b/src/tools/Extractor_projects/shared/ExtractorCommon.cpp index 81770ad55..565c0b837 100644 --- a/src/tools/Extractor_projects/shared/ExtractorCommon.cpp +++ b/src/tools/Extractor_projects/shared/ExtractorCommon.cpp @@ -2,7 +2,7 @@ * MaNGOS is a full featured server for World of Warcraft, supporting * the following clients: 1.12.x, 2.4.3, 3.3.5a, 4.3.4a and 5.4.8 * - * Copyright (C) 2005-2020 MaNGOS + * Copyright (C) 2005-2020 MaNGOS * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -88,8 +88,8 @@ FILE* openWoWExe() } /** -* This function loads up a binary file (WoW executable), then searches for a specified -* group of hex values in order to locate and return the Build # of the file +* This function loads up a binary file (WoW executable), then searches for and returns +* the build number of the file. The build number is searched for in hex form. * * @PARAM sFilename is the filename of the WoW executable to be loaded * @RETURN iBuild the build number of the WoW executable, or 0 if failed diff --git a/src/tools/restart-scripts/mangos.sh b/src/tools/restart-scripts/mangos.sh new file mode 100644 index 000000000..e38124dfc --- /dev/null +++ b/src/tools/restart-scripts/mangos.sh @@ -0,0 +1,16 @@ +#!/bin/bash +#For Debian based distributions only +#Change the path variable that matches your own +#Do not add a trailing slash +path="/home/mangos/server/bin" +SESSION="mangos" +DAEMON="screen -d -m -S $SESSION $path/mangos_check.sh" +screen -r $SESSION -ls -q 2>&1 >/dev/null +echo -e "" +echo "Mangos World has been launched into the background." +echo -e "" +if [ $? -le 10 ]; then +echo "Restarting $DAEMON" +$DAEMON +fi +wait diff --git a/src/tools/restart-scripts/mangos_check.sh b/src/tools/restart-scripts/mangos_check.sh new file mode 100644 index 000000000..ea7ce482e --- /dev/null +++ b/src/tools/restart-scripts/mangos_check.sh @@ -0,0 +1,9 @@ +#!/bin/bash +#For Debian based distributions only +#Change the path variable that matches your own +path="/home/mangos/server/bin" +while true; do +cd $path +./realmd +wait +done diff --git a/src/tools/restart-scripts/realmd.sh b/src/tools/restart-scripts/realmd.sh new file mode 100644 index 000000000..c45b235cb --- /dev/null +++ b/src/tools/restart-scripts/realmd.sh @@ -0,0 +1,16 @@ +#!/bin/bash +#For Debian based distributions only +#Change the path variable that matches your own +#Do not add a trailing slash +path="/home/mangos/server/bin" +SESSION="realmd" +DAEMON="screen -d -m -S $SESSION $path/realmd_check.sh" +screen -r $SESSION -ls -q 2>&1 >/dev/null +echo -e "" +echo "Realmd has been launched into the background." +echo -e "" +if [ $? -le 10 ]; then +echo "Restarting $DAEMON" +$DAEMON +fi +wait diff --git a/src/tools/restart-scripts/realmd_check.sh b/src/tools/restart-scripts/realmd_check.sh new file mode 100644 index 000000000..017e78b5a --- /dev/null +++ b/src/tools/restart-scripts/realmd_check.sh @@ -0,0 +1,10 @@ +#!/bin/bash +#For Debian based distributions only +#Change the path variable that matches your own +#Do not add a trailing slash +path="/home/mangos/server/bin" +while true; do +cd $path +./mangos +wait +done