mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
Update install.sh
This commit is contained in:
33
install.sh
33
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
|
||||
|
||||
Reference in New Issue
Block a user