feat: WebUI Token config (close #16)

This commit is contained in:
WWWw 2024-05-11 15:11:02 +08:00 committed by GitHub
parent dcc4a2a39e
commit 02dfb9be5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,6 +6,10 @@ if [ ! -f "$CONFIG_PATH" ]; then
cp -f config.txt $CONFIG_PATH
if [ "$WEBUI_TOKEN" ]; then
echo "{\"port\": 6099,\"token\": \"$WEBUI_TOKEN\",\"loginRate\": 3}" > napcat/config/webui.json
fi
if [ "$HTTP_PORT" ]; then
sed -i "s/HTTP_PORT/$HTTP_PORT/" $CONFIG_PATH
else