starting bash rewriting job [WIP]
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
######################
|
||||
|
||||
# enable/disable GDB execution
|
||||
export GDB_ENABLED=0
|
||||
|
||||
# gdb file
|
||||
export GDB=""
|
||||
|
||||
# directory where binary are stored
|
||||
exoirt BINPATH=""
|
||||
|
||||
### Put here the pid you configured on your worldserver.conf file ###
|
||||
export SERVERPID=""
|
||||
|
||||
# path to conf file
|
||||
export CONFIG=""
|
||||
|
||||
# path of log files
|
||||
export LOGS_PATH="";
|
||||
|
||||
# exec name
|
||||
export SERVERBIN=""
|
||||
|
||||
# name of screen service ( for restarter )
|
||||
export SCREEN_NAME=""
|
||||
|
||||
######################
|
||||
|
||||
|
||||
+4
-5
@@ -7,11 +7,10 @@ SYSERR="$5"
|
||||
GBD_ENABLED="$6"
|
||||
|
||||
if [ $GBD_ENABLED -eq 1 ]; then
|
||||
echo "run -c $3" > "$GDB_FILE"
|
||||
echo "set logging on" > "$GDB_FILE"
|
||||
echo "set debug timestamp" >> "$GDB_FILE"
|
||||
echo "run -c $3" >> "$GDB_FILE"
|
||||
echo "bt" >> "$GDB_FILE"
|
||||
echo "bt full" >> "$GDB_FILE"
|
||||
echo "info threads" >> "$GDB_FILE"
|
||||
echo "thread apply all bt full" >> "$GDB_FILE"
|
||||
|
||||
[ ! -f "$SYSLOG" ] && touch "$SYSLOG"
|
||||
[ ! -f "$SYSERR" ] && touch "$SYSERR"
|
||||
@@ -19,4 +18,4 @@ if [ $GBD_ENABLED -eq 1 ]; then
|
||||
gdb -x $GDB_FILE --batch $1 >> "$SYSLOG" 2>> "$SYSERR"
|
||||
elif [ $GBD_ENABLED -eq 0 ]; then
|
||||
"./$1" -c "$CONFIG"
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user