From 00acc42b047518a713e6eb881702ad340f7d8813 Mon Sep 17 00:00:00 2001 From: Halbe Bruno Date: Mon, 10 Feb 2025 15:41:24 -0300 Subject: [PATCH] Atualizar mod/install.sh --- mod/install.sh | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/mod/install.sh b/mod/install.sh index 298b27d..7f22ad5 100644 --- a/mod/install.sh +++ b/mod/install.sh @@ -1,8 +1,6 @@ #!/bin/bash # ZabbixMOD by IPv0 - - # Funções de cores para mensagens _echo_green(){ /bin/echo -e "\033[0;32m$@\033[0m"; } _echo_green_n(){ /bin/echo -ne "\033[0;32m$@\033[0m"; } @@ -49,31 +47,31 @@ _motd() { > /etc/update-motd.d/$motd00 - cat << EOF > "/etc/update-motd.d/$motd00" - #!/bin/sh + cat << 'EOF' > "/etc/update-motd.d/$motd00" +#!/bin/sh - _echo_red(){ /bin/echo -e "\033[0;31m\$@\033[0m"; } +_echo_red(){ /bin/echo -e "\033[0;31m\$@\033[0m"; } - #name=\$(figlet -Wf Broadway -w 480 "ZABBIX") - name=\$(figlet -W -w 480 "ZABBIX") +#name=\$(figlet -Wf Broadway -w 480 "ZABBIX") +name=\$(figlet -W -w 480 "ZABBIX") - [ -r /etc/lsb-release ] && . /etc/lsb-release +[ -r /etc/lsb-release ] && . /etc/lsb-release - if [ -z "\$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then - # Fall back to using the very slow lsb_release utility - DISTRIB_DESCRIPTION=\$(lsb_release -s -d) - fi +if [ -z "\$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then + # Fall back to using the very slow lsb_release utility + DISTRIB_DESCRIPTION=\$(lsb_release -s -d) +fi - _echo_red "\$name" - printf "\n" +_echo_red "\$name" +printf "\n" - printf "Bem vindo ao %s (%s).\n" "\$DISTRIB_DESCRIPTION" "\$(uname -r)" - printf "\n" - EOF +printf "Bem vindo ao %s (%s).\n" "\$DISTRIB_DESCRIPTION" "\$(uname -r)" +printf "\n" +EOF - chmod +x *-* + chmod +x /etc/update-motd.d/* - cd /etc && rm /etc/motd && rm -rf /var/run/motd* + cd /etc && rm -f /etc/motd && rm -rf /var/run/motd* ln -s /var/run/motd.dynamic.new motd } @@ -87,14 +85,14 @@ _issue() { figlet_output=$(figlet -Wf Broadway -w 480 "ZABBIX") - cat < /etc/issue - $figlet_output + cat << EOF > /etc/issue +$figlet_output by TECCNIA - https://teccnia.com.br - $issue_content +$issue_content - EOF +EOF } # --------------------------------------