summaryrefslogtreecommitdiff
path: root/modules/acore/startup-scripts/run-engine
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2016-09-24 11:38:04 +0200
committerYehonal <yehonal.azeroth@gmail.com>2016-09-24 14:46:05 +0200
commitb5d6eab68f8df927497012ea2cb0fc08ec27a730 (patch)
tree6aba755c98e880e9352b299717f15d7c6829535b /modules/acore/startup-scripts/run-engine
parente06bdd213293a29370640356694704b47d5c9770 (diff)
Minor fixes to startup-scripts, disabled screen check since it can cause some issues
Diffstat (limited to 'modules/acore/startup-scripts/run-engine')
-rw-r--r--modules/acore/startup-scripts/run-engine30
1 files changed, 15 insertions, 15 deletions
diff --git a/modules/acore/startup-scripts/run-engine b/modules/acore/startup-scripts/run-engine
index 7cecaeb134..a12ebbc3b2 100644
--- a/modules/acore/startup-scripts/run-engine
+++ b/modules/acore/startup-scripts/run-engine
@@ -17,15 +17,15 @@ function configureFiles() {
function checkStatus() {
local ret=1
# wipe do : destroy old screens + ls
- screen -wipe
- if screen -ls $1 | grep -q "No Sockets found"
- then
- return 0
- fi
+ #screen -wipe
+ #if screen -ls $1 | grep -q "No Sockets found"
+ #then
+ # return 0
+ #fi
local gdbres=$(pgrep -f "gdb -x $GDB --batch $SERVERBIN")
- if [[ $GDB_ENABLED -eq 0 && -z $gdbres ]]; then
- return 0
+ if [[ $GDB_ENABLED -eq 1 && ! -z $gdbres ]]; then
+ return 1
fi
#
@@ -34,23 +34,23 @@ function checkStatus() {
# This is an extra check
#
local binres=$(pgrep -f "$SERVERBIN -c $CONFIG")
- if [ -z $binres ]; then
- return 0
+ if [ ! -z $binres ]; then
+ return 1
fi
- return 1
+ return 0
}
function run() {
echo $1
- if [ ! -z $1 ]; then
+ if [ ! -z $1 ]; then
local OPTIONS="-A -m -d -S"
if [ ! -z "$SCREEN_OPTIONS" ]; then
OPTIONS=$SCREEN_OPTIONS
fi
-
+
echo "> Starting with screen ( screen $OPTIONS )"
-
+
screen $OPTIONS $1 "$RUN_ENGINE_PATH/starter" $2 $3 "$4" "$5" "$6" $7
else
$RUN_ENGINE_PATH/starter $2 $3 "$4" "$5" "$6" $7
@@ -61,7 +61,7 @@ function starter() {
cd $BINPATH
mkdir -p "$LOGS_PATH"
-
+
configureFiles
run "$SCREEN_NAME" "$SERVERBIN" "$GDB" "$CONFIG" "$SYSLOG" "$SYSERR" "$GDB_ENABLED"
@@ -72,7 +72,7 @@ function restarter() {
cd $BINPATH
mkdir -p "$LOGS_PATH"
-
+
configureFiles
if [ ! -f $TRACE_FILE ]; then