diff --git a/be3600.sh b/be3600.sh index ec72b54..1906f1d 100755 --- a/be3600.sh +++ b/be3600.sh @@ -302,6 +302,21 @@ update_myself() { exit 0 } +firstboot() { + echo "⚠️ 警告:此操作将恢复出厂设置,所有配置将被清除!" + echo "⚠️ 请确保已备份必要数据。" + read -p "是否确定执行恢复出厂设置?(yes/[no]): " confirm + + if [ "$confirm" = "yes" ]; then + echo "正在执行恢复出厂设置..." + firstboot -y + echo "操作完成,正在重启设备..." + reboot + else + echo "操作已取消。" + fi +} + #根据release地址和命名前缀获取apk地址 get_docker_compose_url() { if [ $# -eq 0 ]; then @@ -379,7 +394,7 @@ while true; do echo light_magenta " 1. $result" echo - light_magenta " 2. 更新脚本" + light_magenta " 2. 重置路由器" echo echo " Q. 退出本程序" echo @@ -394,7 +409,7 @@ while true; do setup_base_init ;; 2) - update_myself + firstboot ;; q | Q) echo "退出"