You've already forked scripts-random
feat: Update files
This commit is contained in:
@@ -76,7 +76,7 @@ configure_asdf_global() {
|
||||
local version="$2"
|
||||
local current_version=$(asdf current "$program" | awk '{print $2}')
|
||||
if [ "$current_version" != "$version" ]; then
|
||||
asdf global "$program" "$version"
|
||||
asdf set "$program" "$version"
|
||||
echo -e "${COLOR_GREEN}Configuración global exitosa de $program $version${COLOR_RESET}"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -20,12 +20,11 @@ curl_missing=false
|
||||
ip_missing=false
|
||||
jq_missing=false
|
||||
mtr_missing=false
|
||||
nordvpn_missing=false
|
||||
ping_missing=false
|
||||
speedtest_missing=false
|
||||
|
||||
# Webs a comprobar
|
||||
websites=("vergaracarmona.es" "gitea.vergaracarmona.es" "diariosenderista.es" "marialuisasefardi.es" "prefapp.es")
|
||||
websites=("vergaracarmona.es" "gitea.vergaracarmona.es" "diariosenderista.es" "marialuisasefardi.es" "ackstorm.com")
|
||||
|
||||
# Control de salida con Ctrl + C
|
||||
ctrl_c() {
|
||||
@@ -59,10 +58,6 @@ check_dependencies() {
|
||||
echo -e "${COLOR_CYAN}Más info: https://www.bitwizard.nl/mtr/${COLOR_RESET}"
|
||||
mtr_missing=true
|
||||
;;
|
||||
nordvpn)
|
||||
echo -e "${COLOR_CYAN}Más info: https://go.nordvpn.net/aff_c?offer_id=15&aff_id=45752&url_id=11987${COLOR_RESET}"
|
||||
nordvpn_missing=true
|
||||
;;
|
||||
ping)
|
||||
echo -e "${COLOR_CYAN}Más info: https://packages.debian.org/sid/iputils-ping${COLOR_RESET}"
|
||||
ping_missing=true
|
||||
@@ -231,35 +226,6 @@ get_public_ip_info() {
|
||||
}
|
||||
|
||||
|
||||
# Estado de nordvpn
|
||||
nordvpn_status() {
|
||||
|
||||
print_title "ℹ ESTADO NORDVPN"
|
||||
|
||||
# Verificar si el comando nordvpn está instalado
|
||||
if [ "$nordvpn_missing" = true ]; then
|
||||
check_dependencies "nordvpn"
|
||||
return
|
||||
fi
|
||||
|
||||
nordvpn status | grep -v "New feature"
|
||||
}
|
||||
|
||||
|
||||
# Nueva conexión nordvpn
|
||||
nordvpn_connect() {
|
||||
print_title "🔌 CONECTANDO NORDVPN"
|
||||
|
||||
# Verificar si el comando nordvpn está instalado
|
||||
if [ "$nordvpn_missing" = true ]; then
|
||||
check_dependencies "nordvpn"
|
||||
return
|
||||
fi
|
||||
|
||||
nordvpn connect Spain Barcelona
|
||||
}
|
||||
|
||||
|
||||
# Test de velocidad
|
||||
speed_test() {
|
||||
|
||||
@@ -297,11 +263,9 @@ main_menu() {
|
||||
echo "2 - Verificar estado de webs"
|
||||
echo "3 - Ver tarjetas de red"
|
||||
echo "4 - Información de IP pública"
|
||||
echo "5 - Estado de NordVPN"
|
||||
echo "6 - Conectar Nordvpn"
|
||||
echo "7 - Test de velocidad"
|
||||
echo "8 - Traceroute"
|
||||
echo "9 - Salir"
|
||||
echo "5 - Test de velocidad"
|
||||
echo "6 - Traceroute"
|
||||
echo "7 - Salir"
|
||||
|
||||
read -p "Ingrese el número de la opción deseada: " choice
|
||||
case $choice in
|
||||
@@ -309,11 +273,9 @@ main_menu() {
|
||||
2) check_websites "${websites[@]}" ;;
|
||||
3) get_interfaces ;;
|
||||
4) get_public_ip_info ;;
|
||||
5) nordvpn_status ;;
|
||||
6) nordvpn_connect ;;
|
||||
7) speed_test ;;
|
||||
8) traceroute ;;
|
||||
9|exit|quit) echo -e "${COLOR_RED}\n\n❗ Saliendo... \n${COLOR_RESET}"; tput cnorm; exit 0 ;;
|
||||
5) speed_test ;;
|
||||
6) traceroute ;;
|
||||
7|8|9|0|exit|q|quit) echo -e "${COLOR_RED}\n\n❗ Saliendo... \n${COLOR_RESET}"; tput cnorm; exit 0 ;;
|
||||
*) echo -e "${COLOR_RED}\n❓ Opción inválida. Inténtelo de nuevo.${COLOR_RESET}" ;;
|
||||
esac
|
||||
done
|
||||
@@ -322,14 +284,13 @@ main_menu() {
|
||||
|
||||
# Función principal
|
||||
main() {
|
||||
for cmd in "curl" "ip" "jq" "mtr" "nordvpn" "ping" "speedtest"; do
|
||||
for cmd in "curl" "ip" "jq" "mtr" "ping" "speedtest"; do
|
||||
check_dependencies "$cmd"
|
||||
done
|
||||
check_connection
|
||||
check_websites "${websites[@]}"
|
||||
get_interfaces
|
||||
get_public_ip_info
|
||||
nordvpn_status
|
||||
main_menu
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user