This commit is contained in:
悟空的日常镜像仓库 2025-05-13 20:06:11 +08:00
parent 619b50be90
commit f624071dac

View File

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