~优化tg-bot启动流程,兼容更多设备

~优化nftables启动流程,优化启用cn绕过时的运行效率和数据显示
~修复tg机器人守护进程没有生效的bug
~修复tg机器人总是绑定失败的bug
~修复9-8功能找不到文件的bug
~修复停止服务时的报错
~修复启动时自动下载缺失数据库时的意外报错
~修复nftables启用了本机代理后局域网代理出错的bug
This commit is contained in:
juewuy
2025-12-27 21:57:24 +08:00
parent ecf99aac39
commit daa600dbea
14 changed files with 64 additions and 69 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/sh
. "$CRASHDIR"/libs/web_json.sh
. "$CRASHDIR"/libs/web_get_lite.sh
private_bot() {
echo "-----------------------------------------------"
@@ -28,7 +28,7 @@ set_bot() {
echo "-----------------------------------------------"
read -p "我已经发送完成(1/0) > " res
if [ "$res" = 1 ]; then
chat=$(web_json_get $url_tg 2>/dev/null)
chat=$(web_get_lite $url_tg 2>/dev/null)
[ -n "$chat" ] && chat_ID=$(echo $chat | sed 's/"update_id":/{\n"update_id":/g' | grep "$public_key" | head -n1 | grep -oE '"id":.*,"is_bot' | sed s'/"id"://' | sed s'/,"is_bot//')
[ -z "$chat_ID" ] && [ "$TOKEN" != 'publictoken' ] && {
echo -e "\033[31m无法获取对话ID请返回重新设置或手动输入ChatID\033[0m"