Update ipv6on.sh

This commit is contained in:
Script Proyect by HP3ICC 2024-08-19 17:22:13 +00:00
parent e6789a4f04
commit 7b2708a21c
1 changed files with 3 additions and 27 deletions

View File

@ -24,33 +24,9 @@ sysctl -p
sed -i 's/ipv6.disable=1//g' /etc/default/grub
update-grub
# Reiniciar para aplicar los cambios
echo "Reiniciando el sistema para aplicar los cambios..."
#reboot
cat > /tmp/completado.sh <<- "EOF"
#!/bin/bash
while : ; do
choix=$(whiptail --title "Script Proyect HP3ICC Esteban Mackay 73." --menu " Precione enter (return o intro) para reiniciar y aplicar cambios. / Press (return or enter) to restart and apply changes." 13 46 2 \
1 " Iniciar Reinicio de equipo " 3>&1 1>&2 2>&3)
exitstatus=$?
#on recupere ce choix
#exitstatus=$?
if [ $exitstatus = 0 ]; then
echo "Your chosen option:" $choix
else
echo "You chose cancel."; break;
fi
# case : action en fonction du choix
case $choix in
1)
whiptail --title "Reinicio Requerido" --msgbox "* Debe reiniciar para aplicar los cambios.\n\nPresione Enter para reiniciar el equipo.\n\n\n* Need to reboot to apply the changes\n\nPress Enter to restart your computer" 15 60
# Reiniciar para aplicar los cambios
echo "Reboot..."
sudo reboot
;;
esac
done
exit 0
EOF
#################################
sudo chmod +x /tmp/completado.sh
#history -c && history -w
sh /tmp/completado.sh