From ebb455c92cb349b30ed0543839225aeecbbd9a7e Mon Sep 17 00:00:00 2001 From: Stefan Pejcic Date: Tue, 18 Feb 2025 14:04:32 +0100 Subject: [PATCH] Update install.sh --- install.sh | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/install.sh b/install.sh index ce5f0a29..2df892a6 100644 --- a/install.sh +++ b/install.sh @@ -56,33 +56,6 @@ exec > >(tee -a "$LOG_FILE") 2>&1 # ====================================================================== # Helper functions that are not mandatory and should not be modified -setup_terminal() { - TPUT_RESET="" - TPUT_WHITE="" - TPUT_BGRED="" - TPUT_BGGREEN="" - TPUT_BOLD="" - TPUT_DIM="" - - test -t 2 || return 1 - - if command -v tput > /dev/null 2>&1; then - if num_colors=$(tput colors 2> /dev/null) && [ "${num_colors:-0}" -ge 8 ]; then - TPUT_RESET="$(tput sgr 0)" - TPUT_WHITE="$(tput setaf 7)" - TPUT_BGRED="$(tput setab 1)" - TPUT_BGGREEN="$(tput setab 2)" - TPUT_BOLD="$(tput bold)" - TPUT_DIM="$(tput dim)" - fi - fi - - echo "${TPUT_RESET}" - - return 0 -} - - # logo print_header() { printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' - @@ -137,8 +110,9 @@ install_started_message(){ # Display error and exit radovan() { - printf >&2 "%s\n\n" "${TPUT_BGRED}${TPUT_WHITE}${TPUT_BOLD} FAILED ${TPUT_RESET}" - echo -e "Error: $2$" >&2 + echo -e "${RED}INSTALLATION FAILED${RESET}" + echo "" + echo -e "Error: $2" >&2 exit 1 } @@ -1770,7 +1744,6 @@ create_admin_and_show_logins_success_message() { ( flock -n 200 || { echo "Error: Another instance of the install script is already running. Exiting."; exit 1; } -setup_terminal || echo > /dev/null # shellcheck disable=SC2068 parse_args "$@" get_server_ipv4