~调整Tailscale的缓存目录为安装目录,增加设备名称设置选项

~修复部分设备开机初始化失败的bug
~部分代码细节优化
This commit is contained in:
juewuy
2026-01-01 10:43:25 +08:00
parent abb90eb6f0
commit 5aafe92198
9 changed files with 21 additions and 16 deletions

View File

@@ -480,6 +480,7 @@ set_tailscale(){
echo -e " 2 设置\033[36m秘钥\033[0m(Auth Key) $ts_auth_key_info"
echo -e " 3 通告路由\033[33m内网地址\033[0m(Subnet) \033[36m$ts_subnet\033[0m"
echo -e " 4 通告路由\033[31m全部流量\033[0m(EXIT-NODE) \033[36m$ts_exit_node\033[0m"
echo -e " 5 设置\033[36m设备名称\033[0m(可选) $ts_hostname"
echo -e " 0 返回上级菜单 \033[0m"
echo "-----------------------------------------------"
read -p "请输入对应数字 > " num
@@ -515,6 +516,11 @@ set_tailscale(){
setconfig ts_exit_node "$ts_exit_node" "$GT_CFG_PATH"
set_tailscale
;;
5)
read -p "请输入希望在Tailscale显示的设备名称 > " ts_hostname
setconfig ts_hostname "$ts_hostname" "$GT_CFG_PATH"
set_tailscale
;;
*) errornum ;;
esac
}

View File

@@ -121,6 +121,7 @@ checkupdate(){
fi
rm -rf "$TMPDIR"/version_new
}
#更新脚本
getscripts(){
get_bin "$TMPDIR"/ShellCrash.tar.gz ShellCrash.tar.gz
@@ -162,6 +163,7 @@ setscripts(){
exit;
fi
}
#更新内核
setcpucore(){ #手动设置内核架构
cpucore_list="armv5 armv7 arm64 386 amd64 mipsle-softfloat mipsle-hardfloat mips-softfloat"
@@ -456,6 +458,7 @@ setcore(){ #内核选择菜单
;;
esac
}
#数据库
getgeo(){ #下载Geo文件
#生成链接
@@ -485,7 +488,6 @@ getgeo(){ #下载Geo文件
fi
sleep 1
}
getcustgeo(){
echo "-----------------------------------------------"
echo "正在获取数据库文件…………"
@@ -505,7 +507,6 @@ getcustgeo(){
fi
sleep 1
}
checkcustgeo(){
[ "$api_tag" = "latest" ] && api_url=latest || api_url="tags/$api_tag"
[ ! -s "$TMPDIR"/geo.list ] && {
@@ -610,7 +611,6 @@ setcustgeo() {
esac
done
}
setgeo() {
while true; do
. $CFG_PATH > /dev/null
@@ -839,6 +839,7 @@ setdb(){
;;
esac
}
#根证书
getcrt(){
echo "-----------------------------------------------"