mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-18 20:39:14 +08:00
core: 添加 ws 自定义端口
This commit is contained in:
parent
6408fa85f1
commit
5f6646b60e
7
trans.sh
7
trans.sh
@ -241,9 +241,14 @@ setup_websocketd() {
|
||||
apk add websocketd
|
||||
wget $confhome/logviewer.html -O /tmp/index.html
|
||||
apk add coreutils
|
||||
|
||||
if [ -z "$web_port" ]; then
|
||||
web_port=80
|
||||
fi
|
||||
|
||||
killall websocketd || true
|
||||
# websocketd 遇到 \n 才推送,因此要转换 \r 为 \n
|
||||
websocketd --loglevel=fatal --staticdir=/tmp \
|
||||
websocketd --port "$web_port" --loglevel=fatal --staticdir=/tmp \
|
||||
stdbuf -oL -eL sh -c "tail -fn+0 /reinstall.log | tr '\r' '\n'" &
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user