本教學使用 EFB, ETM, EWS 和 systemd 守護行程,支援 Ubuntu >= 18.04 & Debian >= 10
(使用 EWS 有 WeChat 網頁版被封的危險,請謹慎使用)
安裝
建議先使用 # apt update && apt upgrade -y
更新所有軟體包
二進制依賴
# apt install -y python3-pip python3-wheel ffmpeg libmagic1 libwebp6
主體
# pip3 install ehforwarderbot efb-telegram-master efb-wechat-slave
設定
# mkdir -p /etc/ehforwarderbot/profiles/wechat/blueset.telegram
EFB
創建 /etc/ehforwarderbot/profiles/wechat/config.yaml
,寫入以下內容
1 | master_channel: blueset.telegram |
ETM
創建 Telegram Bot
建立設定檔
創建 /etc/ehforwarderbot/profiles/wechat/blueset.telegram/config.yaml
,寫入以下內容
1 | token: "TOKEN" |
systemd 守護行程
創建 /etc/systemd/system/[email protected]
,寫入以下內容
1 | [Unit] |
運行
# systemctl start [email protected]
使用 $ journalctl -u [email protected] -e
查看輸出,掃碼登入
設定爲開機自啓動:# systemctl enable [email protected]