Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: User interface refactor #4716

Merged
merged 133 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
6f636b3
refactor: improve log directory creation
dgibbs64 Jul 12, 2023
0e79b9d
refactor: improve console output formatting
dgibbs64 Jul 12, 2023
483ceec
refactor: improve console log creation
dgibbs64 Jul 12, 2023
a73404f
Merge branch 'develop' into feature/ui-changes
dgibbs64 Sep 9, 2023
2094a72
a
dgibbs64 Sep 9, 2023
4694fd9
Merge branch 'develop' into feature/ui-changes
dgibbs64 Sep 26, 2023
2fd6605
refactor: improve log directory creation messages
dgibbs64 Sep 26, 2023
e3ac87c
refactor: improve log directory symlink creation
dgibbs64 Sep 26, 2023
de5d12e
feat: create server directory
dgibbs64 Sep 26, 2023
2617708
refactor: improve console output for fetching files
dgibbs64 Sep 26, 2023
5c58275
refactor: improve formatting of success message
dgibbs64 Sep 26, 2023
071b73a
ui
dgibbs64 Sep 26, 2023
83d6fda
refactor: improve console output for checking and fetching files
dgibbs64 Sep 26, 2023
88e2591
refactor: improve logging message in fn_fetch_file
dgibbs64 Sep 26, 2023
91bd38f
refactor: improve console output in core_dl.sh and linuxgsm.sh
dgibbs64 Sep 26, 2023
0eac5a1
refactor: improve code readability and remove unnecessary comments
dgibbs64 Sep 26, 2023
e239aa5
refactor: improve readability and consistency in code
dgibbs64 Sep 26, 2023
c4a3c5a
refactor: improve logging message in core_dl.sh
dgibbs64 Sep 26, 2023
1f1c272
refactor(core_messages): update print functions
dgibbs64 Sep 26, 2023
9dee51e
refactor: improve header and server directory installation messages
dgibbs64 Sep 27, 2023
9f390f0
refactor: improve log directory creation messages
dgibbs64 Sep 27, 2023
8f7d1b0
refactor: improve log directory creation and server directory install…
dgibbs64 Sep 27, 2023
9dced4d
refactor: improve log directory symlink creation
dgibbs64 Sep 27, 2023
9a70874
feat: create serverfiles directory
dgibbs64 Sep 27, 2023
6aea401
refactor: improve consistency and readability of print functions
dgibbs64 Sep 27, 2023
9c4688e
refactor: improve readability of code in command_update_linuxgsm.sh
dgibbs64 Sep 27, 2023
ce0fad5
refactor: improve logging and error handling in command_update_linuxg…
dgibbs64 Sep 27, 2023
d779fae
refactor: simplify code for checking file differences
dgibbs64 Sep 27, 2023
5d006bd
refactor: improve print message in command_update_linuxgsm.sh
dgibbs64 Sep 27, 2023
8a7c6a3
skip
dgibbs64 Sep 27, 2023
604e312
refactor: improve readability and add emphasis to file names in code
dgibbs64 Sep 27, 2023
c091a1d
feat: improve fetch file output
dgibbs64 Sep 27, 2023
17b0efd
feat: improve log directory creation
dgibbs64 Sep 27, 2023
46d004c
refactor: improve readability and consistency in code
dgibbs64 Sep 27, 2023
cd707f5
feat: add new line before Y/N prompt
dgibbs64 Sep 27, 2023
4faf380
changes
dgibbs64 Sep 27, 2023
e02d212
refactor: improve logging and error handling in install_config.sh
dgibbs64 Sep 27, 2023
64545ac
refactor: improve logging and remove unnecessary code
dgibbs64 Sep 27, 2023
7e22837
refactor: update server names in default configuration files
dgibbs64 Sep 28, 2023
3c8c3af
refactor: remove unused code and files
dgibbs64 Sep 28, 2023
b8c9c9a
refactor: improve readability and error handling in install_config.sh
dgibbs64 Sep 28, 2023
b6278c7
refactor: simplify config file copying and error handling
dgibbs64 Sep 28, 2023
0ba7967
misc changes
dgibbs64 Sep 28, 2023
5077847
reword of dst config install
dgibbs64 Sep 28, 2023
b04ec49
refactor: improve config location listing
dgibbs64 Sep 28, 2023
e040597
ui changes
dgibbs64 Sep 28, 2023
9f14489
refactor: improve code readability and fix typos
dgibbs64 Sep 28, 2023
06b570b
ui changes
dgibbs64 Sep 28, 2023
23fa292
ui changes
dgibbs64 Sep 29, 2023
cfe8b30
fix: update warning message for missing SteamCMD
dgibbs64 Sep 29, 2023
1444d13
refactor: simplify directory creation in install_config.sh
dgibbs64 Sep 29, 2023
df02b1f
feat: add installation and information for SteamCMD
dgibbs64 Sep 29, 2023
81e5fe6
refactor: improve error message in install_config.sh
dgibbs64 Sep 30, 2023
e499c1c
refactor: improve conditional statements in install_config.sh
dgibbs64 Sep 30, 2023
d9658ae
refactor: simplify config directory creation and copying
dgibbs64 Sep 30, 2023
1150b49
refactor: improve variable naming and remove unnecessary code duplica…
dgibbs64 Sep 30, 2023
dfd9a24
feat: improve console output formatting
dgibbs64 Oct 1, 2023
9912556
refactor: remove unnecessary fn_sleep_time calls
dgibbs64 Oct 1, 2023
12de621
refactor: remove unused functions
dgibbs64 Oct 1, 2023
59e7309
refactor: improve consistency and readability of code
dgibbs64 Oct 1, 2023
07a1eef
refactor: improve code readability and efficiency in command_dev_quer…
dgibbs64 Oct 1, 2023
19cb223
refactor: improve query output formatting
dgibbs64 Oct 1, 2023
ee738a6
refactor: simplify storage information display
dgibbs64 Oct 1, 2023
eb5c833
refactor: renamed fatal to fail to improve consistency
dgibbs64 Oct 1, 2023
89ec3ab
feat: add conditional printing of alert messages
dgibbs64 Oct 1, 2023
cd07132
feat: improve console and post details commands
dgibbs64 Oct 1, 2023
fdab007
Merge branch 'develop' into feature/ui-changes
dgibbs64 Sep 29, 2024
058f63d
quit
dgibbs64 Sep 29, 2024
2700fa6
update fn_bootstrap_fetch_file
dgibbs64 Sep 29, 2024
b5620f5
ui changes
dgibbs64 Sep 29, 2024
e7401bd
bootstrap trap
dgibbs64 Sep 29, 2024
329d779
ui updates
dgibbs64 Sep 29, 2024
4c181d4
att bootstrap fetch module
dgibbs64 Sep 29, 2024
240e3d9
ui updates
dgibbs64 Sep 29, 2024
2564d82
bug
dgibbs64 Sep 29, 2024
e9c6f24
merge 2 functions
dgibbs64 Sep 29, 2024
2f8f3a3
ui changes
dgibbs64 Sep 29, 2024
283bb6e
config ui changes
dgibbs64 Sep 29, 2024
8928d87
installer ui changes
dgibbs64 Sep 29, 2024
fd65466
installer ui changes
dgibbs64 Sep 29, 2024
deb84d7
add fn_print and fn_print_nl
dgibbs64 Oct 6, 2024
f21ac30
remove space
dgibbs64 Oct 6, 2024
741d405
add new dev command ui
dgibbs64 Oct 6, 2024
c6ed4a0
bug
dgibbs64 Oct 6, 2024
13f7199
skip to light blue
dgibbs64 Oct 6, 2024
d47604b
update to light blue
dgibbs64 Oct 6, 2024
d5e24f4
reset to default
dgibbs64 Oct 6, 2024
cc8ce9f
update ui changes
dgibbs64 Oct 6, 2024
981938d
steamui changes
dgibbs64 Oct 6, 2024
8feb4b2
print
dgibbs64 Oct 6, 2024
04cff00
fix
dgibbs64 Oct 6, 2024
5e6ee0e
sleep time
dgibbs64 Oct 6, 2024
1350fe6
validate
dgibbs64 Oct 6, 2024
e1812ef
remote location
dgibbs64 Oct 6, 2024
5cefca9
italic url
dgibbs64 Oct 6, 2024
d09ec7a
fastdl
dgibbs64 Oct 6, 2024
636148a
fn_print
dgibbs64 Oct 6, 2024
a956196
fix
dgibbs64 Oct 6, 2024
72a51c9
ui
dgibbs64 Oct 6, 2024
f3ad1d6
speed up
dgibbs64 Oct 6, 2024
9f1e92f
fastdl ui
dgibbs64 Oct 6, 2024
6f28203
ui fix
dgibbs64 Nov 20, 2024
daf2811
ui fix
dgibbs64 Nov 20, 2024
5312e3c
update some headers
dgibbs64 Nov 23, 2024
85f2652
header updates
dgibbs64 Nov 23, 2024
d685faf
minor changes
dgibbs64 Nov 23, 2024
e521d48
install changes
dgibbs64 Nov 23, 2024
7f40e2d
messages refactor
dgibbs64 Nov 23, 2024
a7ee739
ui changes
dgibbs64 Nov 23, 2024
5a5eb89
bug
dgibbs64 Nov 23, 2024
0de0151
standardise exitcode
dgibbs64 Nov 23, 2024
e8f9955
tidy
dgibbs64 Nov 23, 2024
268c6a5
bug
dgibbs64 Nov 23, 2024
1b8635f
bug
dgibbs64 Nov 23, 2024
3a1fad7
revert
dgibbs64 Nov 23, 2024
d002994
updating dev ui
dgibbs64 Nov 24, 2024
7d9df68
ui changes
dgibbs64 Nov 24, 2024
952f5eb
bug
dgibbs64 Nov 24, 2024
7c0199f
skip
dgibbs64 Nov 24, 2024
47f8ca0
bug
dgibbs64 Nov 24, 2024
e8d8a3d
change minimum required message
dgibbs64 Nov 28, 2024
b80be90
fix incorrect var name
dgibbs64 Nov 28, 2024
463674c
ui updates
dgibbs64 Dec 11, 2024
057027f
remove ) from results
dgibbs64 Dec 11, 2024
0776db3
Merge branch 'develop' into feature/ui-changes
dgibbs64 Dec 11, 2024
737880a
revert
dgibbs64 Dec 11, 2024
659a86b
ensure command action capitals are consistant
dgibbs64 Dec 11, 2024
6d142cb
revert
dgibbs64 Dec 11, 2024
ca00889
revert
dgibbs64 Dec 11, 2024
1afbb6d
revert
dgibbs64 Dec 11, 2024
a0f1bfc
codacy
dgibbs64 Dec 11, 2024
9487503
revert
dgibbs64 Dec 11, 2024
d2f0ed6
revert
dgibbs64 Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lgsm/config-default/config-lgsm/ts3server/_default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ consoleinteract="no"
## Game Server Details
# Do not edit
gamename="TeamSpeak 3"
servername="TeamSpeak 3 Server"
servername="LinuxGSM"
engine="null"
glibc="2.17"

Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/alert_email.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ else
mail -s "${alerttitle}" "${email}" < "${alertlog}"
fi
exitcode=$?
if [ "${exitcode}" == "0" ]; then
if [ "${exitcode}" -ne 0 ]; then
fn_print_ok_nl "Sending Email alert: ${email}"
fn_script_log_pass "Sending Email alert: ${email}"
else
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/alert_gotify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends Gotify alert.

module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

jsoninfo=$(
cat << EOF
Expand Down
11 changes: 6 additions & 5 deletions lgsm/modules/check_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@ fn_install_mono_repo() {

# Did Mono repo install correctly?
if [ "${monoautoinstall}" != "1" ]; then
if [ $? != 0 ]; then
exitcode=$?
if [ "${exitcode}" -ne 0 ]; then
fn_print_failure_nl "Unable to install Mono repository."
fn_script_log_fail "Unable to install Mono repository."
else
fn_print_complete_nl "Installing Mono repository completed."
fn_print_success_nl "Installing Mono repository completed."
fn_script_log_pass "Installing Mono repository completed."
fi
fi
Expand Down Expand Up @@ -226,15 +227,15 @@ fn_install_missing_deps() {

else
if [ "${commandname}" == "INSTALL" ]; then
fn_print_information_nl "Required dependencies already installed."
fn_print_skip2_nl "Required dependencies already installed."
fn_script_log_info "Required dependencies already installed."
fi
fi
}

fn_check_loop() {
# Loop though required depenencies checking if they are installed.
for deptocheck in ${array_deps_required[*]}; do
for deptocheck in "${array_deps_required[@]}"; do
fn_deps_detector
done

Expand Down Expand Up @@ -318,7 +319,7 @@ fn_deps_detector() {
fi
# If SteamCMD requirements are not met install will fail.
if [ -n "${appid}" ]; then
for steamcmddeptocheck in ${array_deps_required_steamcmd[*]}; do
for steamcmddeptocheck in "${array_deps_required_steamcmd[@]}"; do
if [ "${deptocheck}" != "steamcmd" ] && [ "${deptocheck}" == "${steamcmddeptocheck}" ]; then
steamcmdfail=1
fi
Expand Down
2 changes: 2 additions & 0 deletions lgsm/modules/check_gamedig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# Website: https://linuxgsm.com
# Description: Installs nodejs and gamedig

moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"

if [ "$(command -v node)" ] && [ "$(command -v npm)" ] && [ "$(node -v | cut -d 'v' -f 2 | cut -d '.' -f 1)" -ge 16 ] && [ ! -f "${lgsmdir}/node_modules/gamedig/bin/gamedig.js" ]; then
echo -e ""
echo -e "${bold}${lightyellow}Installing Gamedig${default}"
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/check_logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_check_logs() {
fn_print_dots "Checking for log files"
fn_print_info_nl "Checking for log files: Creating log files"
checklogs=1
checklogs=true
install_logs.sh
}

Expand Down
5 changes: 3 additions & 2 deletions lgsm/modules/check_system_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ fi
if [ "${ramrequirementgb}" ]; then
if (($(echo "${physmemtotalgb} < ${ramrequirementgb}" | bc -l))); then
fn_print_dots "Checking RAM"
fn_print_warn_nl "Checking RAM: ${ramrequirementgb}G required, ${physmemtotal} available"
echo "* ${gamename} server may fail to run or experience poor performance."
fn_print_warn_nl "Checking RAM: Minumum RAM requirements not met"
fn_print_nl "* ${ramrequirementgb}G is required, but only ${physmemtotal} is available."
fn_print_nl "* ${gamename} server may fail to run or experience poor performance."
fn_sleep_time_5
fi
fi
14 changes: 7 additions & 7 deletions lgsm/modules/command_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Description: Creates a .tar.gz file in the backup directory.

commandname="BACKUP"
commandaction="Backing up"
commandaction="Backup"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set

Expand Down Expand Up @@ -115,7 +115,7 @@ fn_backup_compression() {
# Tells how much will be compressed using rootdirduexbackup value from info_distro and prompt for continue.
fn_print_info "A total of ${rootdirduexbackup} will be compressed."
fn_script_log_info "A total of ${rootdirduexbackup} will be compressed: ${backupdir}/${backupname}.tar.gz"
fn_print_dots "Backup (${rootdirduexbackup}) ${backupname}.tar.gz, in progress..."
fn_print_dots "Backup (${rootdirduexbackup}) ${backupname}.tar.gz, in progress ..."
fn_script_log_info "Backup ${rootdirduexbackup} ${backupname}.tar.gz, in progress"
excludedir=$(fn_backup_relpath)

Expand All @@ -127,16 +127,16 @@ fn_backup_compression() {
fi

tar --use-compress-program=pigz -cf "${backupdir}/${backupname}.tar.gz" -C "${rootdir}" --exclude "${excludedir}" --exclude "${lockdir}" --exclude "${tmpdir}" ./.
local exitcode=$?
if [ "${exitcode}" != 0 ]; then
exitcode=$?
if [ "${exitcode}" -ne 0 ]; then
fn_print_fail_eol
fn_script_log_fail "Backup in progress: FAIL"
echo -e "${extractcmd}" | tee -a "${lgsmlog}"
fn_print_fail_nl "Starting backup"
fn_script_log_fail "Starting backup"
else
fn_print_ok_eol
fn_print_ok_nl "Completed: ${backupname}.tar.gz, total size $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}')"
fn_print_ok_nl "Completed: ${italic}${backupname}.tar.gz${default}, total size $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}')"
fn_script_log_pass "Backup created: ${backupname}.tar.gz, total size $(du -sh "${backupdir}/${backupname}.tar.gz" | awk '{print $1}')"
alert="backup"
alert.sh
Expand Down Expand Up @@ -190,15 +190,15 @@ fn_backup_prune() {
fn_backup_relpath() {
# Written by CedarLUG as a "realpath --relative-to" alternative in bash.
# Populate an array of tokens initialized from the rootdir components.
declare -a rdirtoks=($(readlink -f "${rootdir}" | sed "s/\// /g"))
mapfile -t rdirtoks < <(readlink -f "${rootdir}" | sed "s/\// /g")
if [ ${#rdirtoks[@]} -eq 0 ]; then
fn_print_fail_nl "Problem assessing rootdir during relative path assessment"
fn_script_log_fail "Problem assessing rootdir during relative path assessment: ${rootdir}"
core_exit.sh
fi

# Populate an array of tokens initialized from the backupdir components.
declare -a bdirtoks=($(readlink -f "${backupdir}" | sed "s/\// /g"))
mapfile -t bdirtoks < <(readlink -f "${backupdir}" | sed "s/\// /g")
if [ ${#bdirtoks[@]} -eq 0 ]; then
fn_print_fail_nl "Problem assessing backupdir during relative path assessment"
fn_script_log_fail "Problem assessing backupdir during relative path assessment: ${rootdir}"
Expand Down
11 changes: 6 additions & 5 deletions lgsm/modules/command_console.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
# Description: Gives access to the server tmux console.

commandname="CONSOLE"
commandaction="Access console"
commandaction="Access Console"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set

check.sh
fn_print_header

check.sh

if [ "${consoleverbose}" == "yes" ]; then
echo -e "* Verbose output: ${lightgreen}yes${default}"
elif [ "${consoleverbose}" == "no" ]; then
Expand All @@ -29,10 +30,10 @@ else
echo -e "* Interactive output: ${red}unknown${default}"
fi
echo ""
fn_print_information_nl "Press \"CTRL+b\" then \"d\" to exit console."
fn_print_warning_nl "Do NOT press CTRL+c to exit."
echo -e "* https://docs.linuxgsm.com/commands/console"
fn_print_information_nl "Press ${italic}\"CTRL+b\"${default} then ${italic}\"d\"${default} to exit console."
fn_print_warning_nl "Do ${underline}NOT${default} press CTRL+c to exit."
echo -e ""
echo -e "${italic}https://docs.linuxgsm.com/commands/console${default}"
if ! fn_prompt_yn "Continue?" Y; then
exitcode=0
core_exit.sh
Expand Down
13 changes: 8 additions & 5 deletions lgsm/modules/command_debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Description: Runs the server without tmux and directly from the terminal.

commandname="DEBUG"
commandaction="Debuging"
commandaction="Debugging"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set

Expand All @@ -24,11 +24,13 @@ fn_lockfile_trap() {
core_exit.sh
}

fn_print_header

check.sh
fix.sh
info_distro.sh
info_game.sh
fn_print_header

{
echo -e "${lightblue}Distro:\t\t${default}${distroname}"
echo -e "${lightblue}Architecture:\t\t${default}${arch}"
Expand Down Expand Up @@ -121,9 +123,10 @@ else
eval "${preexecutable} ${executable} ${startparameters}"
fi

if [ $? -ne 0 ]; then
fn_print_error_nl "Server has stopped: exit code: $?"
fn_script_log_error "Server has stopped: exit code: $?"
exitcode=$?
if [ "${exitcode}" -ne 0 ]; then
fn_print_error_nl "Server has stopped: exit code: ${exitcode}"
fn_script_log_error "Server has stopped: exit code: ${exitcode}"
fn_print_error_nl "Press ENTER to exit debug mode"
read -r
else
Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/command_details.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Description: Displays server information.

commandname="DETAILS"
commandaction="Viewing details"
commandaction="Display Details"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set

Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/command_dev_clear_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Description: Deletes the contents of the modules dir.

commandname="DEV-CLEAR-MODULES"
commandaction="Clearing modules"
commandaction="Clear Modules"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set

Expand Down
2 changes: 1 addition & 1 deletion lgsm/modules/command_dev_debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Description: Dev only: Enables debugging log to be saved to dev-debug.log.

commandname="DEV-DEBUG"
commandaction="Developer debug"
commandaction="Developer Debug"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_reset

Expand Down
8 changes: 3 additions & 5 deletions lgsm/modules/command_dev_detect_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
# Description: Detects dependencies the server binary requires.

commandname="DEV-DETECT-DEPS"
commandaction="Developer detect deps"
commandaction="Dependency Checker"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set

echo -e ""
echo -e "${bold}Dependencies Checker${default}"
fn_messages_separator
fn_print_header
echo -e "Checking directory: "
echo -e "${serverfiles}"
if [ "$(command -v eu-readelf 2> /dev/null)" ]; then
Expand Down Expand Up @@ -186,7 +184,7 @@ echo -e "${bold}Required Dependencies${default}"
fn_messages_separator
echo -e "${executable}"
echo -e ""
echo -e "CentOS"
echo -e "${bold}CentOS"
fn_messages_separator
cat "${tmpdir}/.depdetect_centos_line"
echo -e ""
Expand Down
14 changes: 6 additions & 8 deletions lgsm/modules/command_dev_detect_glibc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
# Can check a file or directory recursively.

commandname="DEV-DETECT-GLIBC"
commandaction="Developer detect glibc"
commandaction="Detect Glibc Requirements"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set

fn_messages_separator
echo -e "glibc Requirements Checker"
fn_messages_separator
fn_print_header

if [ ! "$(command -v objdump 2> /dev/null)" ]; then
fn_print_failure_nl "objdump is missing"
Expand Down Expand Up @@ -48,17 +46,17 @@ for glibc_check_var in "${glibc_check_dir_array[@]}"; do
glibc_check_files=$(find "${glibc_check_dir}" | wc -l)
find "${glibc_check_dir}" -type f -print0 \
| while IFS= read -r -d $'\0' line; do
glibcversion=$(objdump -T "${line}" 2> /dev/null | grep -oP "GLIBC[^ ]+" | grep -v GLIBCXX | sort | uniq | sort -r --version-sort | head -n 1)
glibcversion=$(objdump -T "${line}" 2> /dev/null | grep -oP "GLIBC[^ ]+" | grep -v GLIBCXX | sort | uniq | sort -r --version-sort | head -n 1 | sed 's/)$//')
if [ "${glibcversion}" ]; then
echo -e "${glibcversion}: ${line}" >> "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp"
fi
objdump -T "${line}" 2> /dev/null | grep -oP "GLIBC[^ ]+" >> "${tmpdir}/detect_glibc_${glibc_check_var}.tmp"
objdump -T "${line}" 2> /dev/null | grep -oP "GLIBC[^ ]+" | sed 's/)$//' >> "${tmpdir}/detect_glibc_${glibc_check_var}.tmp"
echo -n "${i} / ${glibc_check_files}" $'\r'
((i++))
done
echo -e ""
echo -e ""
echo -e "${glibc_check_name} glibc Requirements"
fn_print_nl "${bold}${lightyellow}${glibc_check_name} glibc Requirements"
fn_messages_separator
if [ -f "${tmpdir}/detect_glibc_files_${glibc_check_var}.tmp" ]; then
echo -e "Required glibc"
Expand All @@ -80,7 +78,7 @@ for glibc_check_var in "${glibc_check_dir_array[@]}"; do
fi
done
echo -e ""
echo -e "Final glibc Requirement"
fn_print_nl "${bold}${lightyellow}Final glibc Requirement"
fn_messages_separator
if [ -f "${tmpdir}/detect_glibc_highest.tmp" ]; then
cat "${tmpdir}/detect_glibc_highest.tmp" | sort | uniq | sort -r --version-sort | head -1
Expand Down
10 changes: 4 additions & 6 deletions lgsm/modules/command_dev_detect_ldd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
# Can check a file or directory recursively.

commandname="DEV-DETECT-LDD"
commandaction="Developer detect ldd"
commandaction="Shared Object Dependencies Checker"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set

fn_messages_separator
echo -e "Shared Object dependencies Checker"
fn_messages_separator
fn_print_header

if [ -z "${serverfiles}" ]; then
dir=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
Expand Down Expand Up @@ -46,12 +44,12 @@ find "${serverfiles}" -type f -print0 \
done
echo -e ""
echo -e ""
echo -e "All"
fn_print_nl "${bold}${lightyellow}All${default}"
fn_messages_separator
cat "${tmpdir}/detect_ldd.tmp"

echo -e ""
echo -e "Not Found"
fn_print_nl "${bold}${lightyellow}Not Found${default}"
fn_messages_separator
cat "${tmpdir}/detect_ldd_not_found.tmp"

Expand Down
7 changes: 7 additions & 0 deletions lgsm/modules/command_dev_parse_distro_details.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
# Website: https://linuxgsm.com
# Description: Display parsed distro details.

commandname="DEV-PARSE-DISTRO-DETAILS"
commandaction="Parse Distro Details"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set

fn_print_header

check_ip.sh
check_status.sh
info_distro.sh
Expand Down
7 changes: 7 additions & 0 deletions lgsm/modules/command_dev_parse_game_details.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
# Website: https://linuxgsm.com
# Description: Display parsed gameserver details.

commandname="DEV-PARSE-GAME-DETAILS"
commandaction="Parse Game Details"
moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set

fn_print_header

if [ -f "config" ]; then
servercfgfullpath="config"
fi
Expand Down
Loading
Loading