mirror of
https://github.com/AAAAAEXQOSyIpN2JZ0ehUQ/SSHPLUS-MANAGER-FREE.git
synced 2024-11-23 13:46:17 +00:00
23 lines
744 B
Bash
23 lines
744 B
Bash
#!/bin/bash
|
|
|
|
IP=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -o -E '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1)
|
|
if [[ "$IP" = "" ]]; then
|
|
IP=$(wget -qO- ipv4.icanhazip.com)
|
|
fi
|
|
|
|
clear
|
|
echo -e "\033[01;33m Capturador de IP "
|
|
echo ""
|
|
echo -ne "\033[1;32mConfirme seu IP \033[1;37m"; read -e -i $IP ipdovps
|
|
echo "$IP" > /etc/IP
|
|
echo "$IP" > /etc/MEUIPADM
|
|
echo "$IP" > /usr/bin/vendor_code
|
|
echo ""
|
|
echo -e "\033[1;32m IP Capturada \033[1;37m"
|
|
echo ""
|
|
echo -e "\033[1;32m Ruta guardada \033[1;31m/etc/IP \033[1;37m"
|
|
echo -e "\033[1;32m Ruta guardada \033[1;31m/etc/MEUIPADM \033[1;37m"
|
|
echo -e "\033[1;32m Ruta guardada \033[1;31m/usr/bin/vendor_code \033[1;37m"
|
|
echo ""
|
|
exit
|