onlyrickroll commited on
Commit
2369ff4
·
verified ·
1 Parent(s): 37f63d7

Update entrypoint.sh

Browse files
Files changed (1) hide show
  1. entrypoint.sh +7 -22
entrypoint.sh CHANGED
@@ -19,12 +19,13 @@ cat <<EOF > ~/.nanobot/config.json
19
  }
20
  },
21
  "channels": {
22
- "telegram": {
23
- "enable": true,
24
- "token": $TG_TOKEN,
25
- "allowFrom": [],
26
- "proxy": null
27
- }
 
28
  }
29
  }
30
  EOF
@@ -39,26 +40,10 @@ EOF
39
  echo "Starting Python bot on port 8888..."
40
  ~/.local/bin/nanobot gateway -p 8888 > nanobot.log 2>&1 &
41
 
42
- #
43
-
44
- sleep 5
45
 
46
  ~/.local/bin/nanobot status
47
  ~/.local/bin/nanobot --help
48
- # 查看进程是否存在
49
- ps -ef | grep nanobot
50
-
51
- # 查看该进程打开的所有句柄(如果没有 TCP,说明 Web 框架没加载)
52
- # 首先获取 PID
53
- PID=$(pgrep -f nanobot)
54
- ls -l /proc/$PID/fd
55
-
56
- tail -n 20 nanobot.log
57
-
58
- # 检测端口
59
- netstat -an
60
 
61
- netstat -nlp
62
 
63
  # 4. 启动 Nginx 作为主进程 (监听 7860)
64
  # daemon off 确保容器不会立即退出
 
19
  }
20
  },
21
  "channels": {
22
+ "telegram": {
23
+ "enable": true,
24
+ "token": $TG_TOKEN,
25
+ "allowFrom": [],
26
+ "proxy": null
27
+ },
28
+
29
  }
30
  }
31
  EOF
 
40
  echo "Starting Python bot on port 8888..."
41
  ~/.local/bin/nanobot gateway -p 8888 > nanobot.log 2>&1 &
42
 
 
 
 
43
 
44
  ~/.local/bin/nanobot status
45
  ~/.local/bin/nanobot --help
 
 
 
 
 
 
 
 
 
 
 
 
46
 
 
47
 
48
  # 4. 启动 Nginx 作为主进程 (监听 7860)
49
  # daemon off 确保容器不会立即退出