mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
Minor fixes to startup-scripts, disabled screen check since it can cause some issues
This commit is contained in:
@@ -17,15 +17,15 @@ function configureFiles() {
|
|||||||
function checkStatus() {
|
function checkStatus() {
|
||||||
local ret=1
|
local ret=1
|
||||||
# wipe do : destroy old screens + ls
|
# wipe do : destroy old screens + ls
|
||||||
screen -wipe
|
#screen -wipe
|
||||||
if screen -ls $1 | grep -q "No Sockets found"
|
#if screen -ls $1 | grep -q "No Sockets found"
|
||||||
then
|
#then
|
||||||
return 0
|
# return 0
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
local gdbres=$(pgrep -f "gdb -x $GDB --batch $SERVERBIN")
|
local gdbres=$(pgrep -f "gdb -x $GDB --batch $SERVERBIN")
|
||||||
if [[ $GDB_ENABLED -eq 0 && -z $gdbres ]]; then
|
if [[ $GDB_ENABLED -eq 1 && ! -z $gdbres ]]; then
|
||||||
return 0
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -34,23 +34,23 @@ function checkStatus() {
|
|||||||
# This is an extra check
|
# This is an extra check
|
||||||
#
|
#
|
||||||
local binres=$(pgrep -f "$SERVERBIN -c $CONFIG")
|
local binres=$(pgrep -f "$SERVERBIN -c $CONFIG")
|
||||||
if [ -z $binres ]; then
|
if [ ! -z $binres ]; then
|
||||||
return 0
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 1
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
function run() {
|
function run() {
|
||||||
echo $1
|
echo $1
|
||||||
if [ ! -z $1 ]; then
|
if [ ! -z $1 ]; then
|
||||||
local OPTIONS="-A -m -d -S"
|
local OPTIONS="-A -m -d -S"
|
||||||
if [ ! -z "$SCREEN_OPTIONS" ]; then
|
if [ ! -z "$SCREEN_OPTIONS" ]; then
|
||||||
OPTIONS=$SCREEN_OPTIONS
|
OPTIONS=$SCREEN_OPTIONS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "> Starting with screen ( screen $OPTIONS )"
|
echo "> Starting with screen ( screen $OPTIONS )"
|
||||||
|
|
||||||
screen $OPTIONS $1 "$RUN_ENGINE_PATH/starter" $2 $3 "$4" "$5" "$6" $7
|
screen $OPTIONS $1 "$RUN_ENGINE_PATH/starter" $2 $3 "$4" "$5" "$6" $7
|
||||||
else
|
else
|
||||||
$RUN_ENGINE_PATH/starter $2 $3 "$4" "$5" "$6" $7
|
$RUN_ENGINE_PATH/starter $2 $3 "$4" "$5" "$6" $7
|
||||||
@@ -61,7 +61,7 @@ function starter() {
|
|||||||
cd $BINPATH
|
cd $BINPATH
|
||||||
|
|
||||||
mkdir -p "$LOGS_PATH"
|
mkdir -p "$LOGS_PATH"
|
||||||
|
|
||||||
configureFiles
|
configureFiles
|
||||||
|
|
||||||
run "$SCREEN_NAME" "$SERVERBIN" "$GDB" "$CONFIG" "$SYSLOG" "$SYSERR" "$GDB_ENABLED"
|
run "$SCREEN_NAME" "$SERVERBIN" "$GDB" "$CONFIG" "$SYSLOG" "$SYSERR" "$GDB_ENABLED"
|
||||||
@@ -72,7 +72,7 @@ function restarter() {
|
|||||||
cd $BINPATH
|
cd $BINPATH
|
||||||
|
|
||||||
mkdir -p "$LOGS_PATH"
|
mkdir -p "$LOGS_PATH"
|
||||||
|
|
||||||
configureFiles
|
configureFiles
|
||||||
|
|
||||||
if [ ! -f $TRACE_FILE ]; then
|
if [ ! -f $TRACE_FILE ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user