Atualizar mod/install.sh
This commit is contained in:
parent
fe884a073b
commit
00acc42b04
@ -1,8 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# ZabbixMOD by IPv0
|
# ZabbixMOD by IPv0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Funções de cores para mensagens
|
# Funções de cores para mensagens
|
||||||
_echo_green(){ /bin/echo -e "\033[0;32m$@\033[0m"; }
|
_echo_green(){ /bin/echo -e "\033[0;32m$@\033[0m"; }
|
||||||
_echo_green_n(){ /bin/echo -ne "\033[0;32m$@\033[0m"; }
|
_echo_green_n(){ /bin/echo -ne "\033[0;32m$@\033[0m"; }
|
||||||
@ -49,7 +47,7 @@ _motd() {
|
|||||||
|
|
||||||
> /etc/update-motd.d/$motd00
|
> /etc/update-motd.d/$motd00
|
||||||
|
|
||||||
cat << EOF > "/etc/update-motd.d/$motd00"
|
cat << 'EOF' > "/etc/update-motd.d/$motd00"
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
_echo_red(){ /bin/echo -e "\033[0;31m\$@\033[0m"; }
|
_echo_red(){ /bin/echo -e "\033[0;31m\$@\033[0m"; }
|
||||||
@ -71,9 +69,9 @@ _motd() {
|
|||||||
printf "\n"
|
printf "\n"
|
||||||
EOF
|
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
|
ln -s /var/run/motd.dynamic.new motd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user