From 7c0199f225936309cc821bec9408914b49f247ac Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 24 Nov 2024 01:06:08 +0000 Subject: [PATCH] skip --- lgsm/modules/check_deps.sh | 2 +- lgsm/modules/command_start.sh | 2 +- lgsm/modules/command_stop.sh | 2 +- lgsm/modules/core_messages.sh | 20 ++++++++++++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index dded9cc2f7..348e49b6c3 100644 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -227,7 +227,7 @@ 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 diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh index 5d372f020c..a4e07b44b3 100644 --- a/lgsm/modules/command_start.sh +++ b/lgsm/modules/command_start.sh @@ -176,7 +176,7 @@ check.sh # If the server already started dont start again. if [ "${status}" != "0" ]; then fn_print_dots "${servername}" - fn_print_info_nl "${servername} is already running" + fn_print_skip_nl "${servername} is already running" fn_script_log_error "${servername} is already running" if [ -z "${exitbypass}" ]; then # Remove starting lockfile when command ends. diff --git a/lgsm/modules/command_stop.sh b/lgsm/modules/command_stop.sh index 037ec500fe..f1edc35444 100644 --- a/lgsm/modules/command_stop.sh +++ b/lgsm/modules/command_stop.sh @@ -370,7 +370,7 @@ fn_stop_tmux() { # Checks if the server is already stopped. fn_stop_pre_check() { if [ "${status}" == "0" ]; then - fn_print_info_nl "${servername} is already stopped" + fn_print_skip_nl "${servername} is already stopped" fn_script_log_info "${servername} is already stopped" else # Select graceful shutdown. diff --git a/lgsm/modules/core_messages.sh b/lgsm/modules/core_messages.sh index f6363310ae..1149ae88fa 100644 --- a/lgsm/modules/core_messages.sh +++ b/lgsm/modules/core_messages.sh @@ -198,6 +198,15 @@ fn_print_info_nl() { fn_print_message_nl "INFO" "${cyan}" "$*" } +# [ SKIP ] +fn_print_skip() { + fn_print_message "SKIP" "${cyan}" "$*" +} + +fn_print_SKIP_nl() { + fn_print_message_nl "SKIP" "${cyan}" "$*" +} + # [ START ] fn_print_start() { fn_print_message "START" "${lightgreen}" "$*" @@ -283,6 +292,17 @@ fn_print_information_nl() { fn_sleep_time } +# Skip! +fn_print_skip2() { + echo -en "${cyan}Skip!${default} $*${default}" + fn_sleep_time +} + +fn_print_skip2_nl() { + echo -e "${cyan}Skip!${default} $*${default}" + fn_sleep_time +} + # Y/N Prompt fn_prompt_yn() { echo -e ""