diff options
-rw-r--r-- | modules/acore/startup-scripts/conf.sh.dist | 28 | ||||
-rw-r--r-- | modules/acore/startup-scripts/run-engine | 11 |
2 files changed, 32 insertions, 7 deletions
diff --git a/modules/acore/startup-scripts/conf.sh.dist b/modules/acore/startup-scripts/conf.sh.dist index fbf31e3cab..774a7c01ce 100644 --- a/modules/acore/startup-scripts/conf.sh.dist +++ b/modules/acore/startup-scripts/conf.sh.dist @@ -1,36 +1,50 @@ # enable/disable GDB execution export GDB_ENABLED=0 -# gdb file +# [optional] gdb file +# default: gdb.txt export GDB="" # directory where binary are stored export BINPATH="" - ### Put here the pid you configured on your worldserver.conf file ### +# Put here the pid you configured on your worldserver.conf file +# needed when GDB_ENABLED=1 export SERVERPID="" -# path to conf file +# path to configuration file (including the file name) +# ex: /home/user/azerothcore/etc/worldserver.conf export CONFIG="" # path of log files +# needed by restarter to store its logs export LOGS_PATH=""; # exec name +# ex: worldserver export SERVERBIN="" # prefix name for log files +# to avoid collision with other restarters export LOG_PREFIX_NAME="" -# name of screen service ( for restarter ) +# [optional] name of screen service # if no specified, screen util won't be used export SCREEN_NAME="" -# overwrite default screen options: -A -m -d -S +# [optional] overwrite default screen options: -A -m -d -S +# WARNING: if you are running it under a systemd service +# please do not remove -m -d arguments from screen if are you using it, +# or keep WITH_CONSOLE=0 . +# otherwise the journald-logging system will take 100% of CPU slowing +# down the whole machine. It's because a systemd service should have +# low console output. export SCREEN_OPTIONS="" -# enable it to show the output -# within console +# enable/disable it to show the output +# within console, if disable the output will be redirect to +# logging files +# export WITH_CONSOLE=0 diff --git a/modules/acore/startup-scripts/run-engine b/modules/acore/startup-scripts/run-engine index a12ebbc3b2..86391f02a7 100644 --- a/modules/acore/startup-scripts/run-engine +++ b/modules/acore/startup-scripts/run-engine @@ -5,6 +5,16 @@ if [ -e "$RUN_ENGINE_PATH/conf.dist" ]; then source "$RUN_ENGINE_PATH/conf.sh.dist" fi +function finish { + if [ ! -z "$SCREEN_NAME" ]; then + screen -X -S "$SCREEN_NAME" quit + fi +} + +# disabled for now, but could be useful if we want +# shutdown the process if restarter crashes for some reason +# trap finish EXIT + function configureFiles() { TRACE_BEGIN_STRING="SIGSEGV" TRACE_FILE="$LOGS_PATH/"$LOG_PREFIX_NAME"_trace.log" @@ -100,3 +110,4 @@ function restarter() { sleep 10 done } + |