mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2025-01-08 12:07:37 +08:00
New feature: Dev debug
I useful feature for developers. This will enable a log to be created of everything that ran when executing a command. It uses the set command. When you run a command a file dev-debug.log is created and will output set -x
This commit is contained in:
parent
b1e31126bf
commit
35be754990
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -4,6 +4,12 @@
|
||||
# Author: Daniel Gibbs
|
||||
# Contributor: Scarsz
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -4,6 +4,12 @@
|
||||
# Author: Daniel Gibbs
|
||||
# Contributor: Summit Singh Thakur
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -4,6 +4,12 @@
|
||||
# Author: Daniel Gibbs
|
||||
# Contributions: Bryce Van Dyk (SingingTree)
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="121215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -4,6 +4,12 @@
|
||||
# Author: Daniel Gibbs
|
||||
# Contributor: Bryce Van Dyk (SingingTree)
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -4,6 +4,12 @@
|
||||
# Author: Daniel Gibbs
|
||||
# Contributor: Bryce Van Dyk (SingingTree)
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="201215"
|
||||
|
||||
#### Variables ####
|
||||
|
@ -3,6 +3,12 @@
|
||||
# Server Management Script
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
if [ -f ".dev-debug" ]; then
|
||||
exec 5>dev-debug.log
|
||||
BASH_XTRACEFD="5"
|
||||
set -x
|
||||
fi
|
||||
|
||||
version="121215"
|
||||
|
||||
#### Variables ####
|
||||
|
13
functions/fn_debug_dev
Normal file
13
functions/fn_debug_dev
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
# LGSM fn_debug_dev function
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
lgsm_version="061115"
|
||||
|
||||
if [ -f ".dev-debug" ]; then
|
||||
rm .dev-debug
|
||||
fn_printoknl "Disabled dev-debug"
|
||||
else
|
||||
date > .dev-debug
|
||||
fn_printoknl "Enabled dev-debug"
|
||||
fi
|
@ -2,7 +2,7 @@
|
||||
# LGSM fn_functions function
|
||||
# Author: Daniel Gibbs
|
||||
# Website: http://gameservermanagers.com
|
||||
lgsm_version="061115"
|
||||
lgsm_version="201215"
|
||||
|
||||
# Description: Defines all functions to allow download and execution of functions using fn_runfunction.
|
||||
# This function is called first before any other function. Without this file other functions would not load.
|
||||
@ -102,6 +102,11 @@ functionfile="${FUNCNAME}"
|
||||
fn_runfunction
|
||||
}
|
||||
|
||||
fn_debug_dev(){
|
||||
functionfile="${FUNCNAME}"
|
||||
fn_runfunction
|
||||
}
|
||||
|
||||
fn_deps_detect(){
|
||||
functionfile="${FUNCNAME}"
|
||||
fn_runfunction
|
||||
|
@ -35,6 +35,8 @@ case "$getopt" in
|
||||
fn_console;;
|
||||
d|debug)
|
||||
fn_debug;;
|
||||
dev|dev-debug)
|
||||
fn_debug_dev;;
|
||||
i|install)
|
||||
fn_install;;
|
||||
ai|auto-install)
|
||||
@ -88,6 +90,8 @@ case "$getopt" in
|
||||
fn_details;;
|
||||
b|backup)
|
||||
fn_backup;;
|
||||
dev|dev-debug)
|
||||
fn_debug_dev;;
|
||||
i|install)
|
||||
fn_install;;
|
||||
ai|auto-install)
|
||||
@ -133,6 +137,8 @@ case "$getopt" in
|
||||
fn_email_test;;
|
||||
b|backup)
|
||||
fn_backup;;
|
||||
dev|dev-debug)
|
||||
fn_debug_dev;;
|
||||
console)
|
||||
fn_console;;
|
||||
d|debug)
|
||||
@ -189,6 +195,8 @@ case "$getopt" in
|
||||
fn_console;;
|
||||
d|debug)
|
||||
fn_debug;;
|
||||
dev|dev-debug)
|
||||
fn_debug_dev;;
|
||||
i|install)
|
||||
fn_install;;
|
||||
ai|auto-install)
|
||||
@ -247,6 +255,8 @@ case "$getopt" in
|
||||
fn_console;;
|
||||
d|debug)
|
||||
fn_debug;;
|
||||
dev|dev-debug)
|
||||
fn_debug_dev;;
|
||||
i|install)
|
||||
fn_install;;
|
||||
mc|map-compressor)
|
||||
@ -307,6 +317,8 @@ case "$getopt" in
|
||||
fn_console;;
|
||||
d|debug)
|
||||
fn_debug;;
|
||||
dev|dev-debug)
|
||||
fn_debug_dev;;
|
||||
i|install)
|
||||
fn_install;;
|
||||
ai|auto-install)
|
||||
@ -366,6 +378,8 @@ case "$getopt" in
|
||||
fn_console;;
|
||||
d|debug)
|
||||
fn_debug;;
|
||||
dev|dev-debug)
|
||||
fn_debug_dev;;
|
||||
i|install)
|
||||
fn_install;;
|
||||
mc|map-compressor)
|
||||
|
Loading…
Reference in New Issue
Block a user