From 36ca80b8d6fba38124d3150166e18163a5aafbbb Mon Sep 17 00:00:00 2001 From: oOStroudyOo <111181956+oOStroudyOo@users.noreply.github.com> Date: Fri, 20 Dec 2024 23:17:21 +0000 Subject: [PATCH] Improve motd Added gold colour. Added TABS (A longer version of TAB for central heading / Reduced code). Added building icon. Added hammer and spanner icon (GitHub). Change LXC Container title to more central location and in gold. Added website URL. Split the lines to show Org, Website and GitHub on separate lines. Change Org icon to building. Added the hammer and spanner emoji to GitHub line. Changed IP icon from idea to network. Added line break under the title for better readability. Added line break under the IP address for better readability. --- misc/install.func | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/misc/install.func b/misc/install.func index 24f752a4..22125d5d 100644 --- a/misc/install.func +++ b/misc/install.func @@ -12,6 +12,7 @@ color() { BL=$(echo "\033[36m") RD=$(echo "\033[01;31m") GN=$(echo "\033[1;92m") + GD=$(echo "\033[38;5;214m") # Formatting CL=$(echo "\033[m") @@ -19,6 +20,7 @@ color() { BOLD=$(echo "\033[1m") HOLD=" " TAB=" " + TABS=" " # System RETRY_NUM=10 @@ -34,6 +36,9 @@ color() { HOSTNAME="${TAB}🏠${TAB}${CL}" GATEWAY="${TAB}🌐${TAB}${CL}" DEFAULT="${TAB}⚙️${TAB}${CL}" + GITHUB="${TAB}🛠️${TAB}${CL}" + ORG="${TAB}🏢${TAB}${CL}" + } # This function enables IPv6 if it's not disabled and sets verbose mode if the global variable is set to "yes" @@ -218,13 +223,15 @@ motd_ssh() { MOTD_FILE="/etc/motd" if [ -f "$MOTD_FILE" ]; then # Start MOTD with application info and link - echo -e "\n${BOLD}${APPLICATION} LXC Container${CL}" > "$MOTD_FILE" - echo -e "${TAB}${GATEWAY}${YW} Provided by: ${GN}community-scripts ORG ${YW}| GitHub: ${GN}https://github.com/community-scripts/ProxmoxVE${CL}\n" >> "$MOTD_FILE" + echo -e "\n${TABS}${BOLD}${GD}${APPLICATION} LXC Container${CL}\n" > "$MOTD_FILE" + echo -e "${TAB}${ORG}${YW} Provided by: ${GN}community-scripts ORG${CL}" >> "$MOTD_FILE" + echo -e "${TAB}${GATEWAY}${YW} Web: ${GN}https://helper-scripts.com/${CL}" >> "$MOTD_FILE" + echo -e "${TAB}${GITHUB}${YW} GitHub: ${GN}https://github.com/community-scripts/ProxmoxVE${CL}\n" >> "$MOTD_FILE" # Add system information with icons echo -e "${TAB}${OS}${YW} OS: ${GN}${OS_NAME} - Version: ${OS_VERSION}${CL}" >> "$MOTD_FILE" echo -e "${TAB}${HOSTNAME}${YW} Hostname: ${GN}$(hostname)${CL}" >> "$MOTD_FILE" - echo -e "${TAB}${INFO}${YW} IP Address: ${GN}${IP}${CL}" >> "$MOTD_FILE" + echo -e "${TAB}${NETWORK}${YW} IP Address: ${GN}${IP}${CL}\n" >> "$MOTD_FILE" else echo "MotD file does not exist!" >&2 fi