mirror of
https://github.com/NapNeko/NapCat-Docker.git
synced 2025-12-19 06:30:12 +08:00
feat: more config
This commit is contained in:
parent
5df4dec4f9
commit
e5d9e3a179
@ -1,17 +1,21 @@
|
||||
{
|
||||
"httpPort": HTTP_PORT,
|
||||
"httpHost": "HTTP_HOST",
|
||||
"httpPostUrls": ["HTTP_URLS"],
|
||||
"httpSecret": "",
|
||||
"wsPort": WS_PORT,
|
||||
"wsHost": "WS_HOST",
|
||||
"wsReverseUrls": ["WS_URLS"],
|
||||
"enableHttp": HTTP_ENABLE,
|
||||
"enableHttpPost": HTTP_POST_ENABLE,
|
||||
"enableWs": WS_ENABLE,
|
||||
"enableWsReverse": WSR_ENABLE,
|
||||
"enableHttpHeart": HTTP_HEART_ENABLE,
|
||||
"messagePostFormat": "MESSAGE_POST_FORMAT",
|
||||
"reportSelfMessage": RSM_ENABLE,
|
||||
"debug": DEBUG_ENABLE,
|
||||
"enableLocalFile2Url": F2U_ENABLE,
|
||||
"heartInterval": HEART,
|
||||
"musicSignUrl": "MUSIC_SIGN_URL",
|
||||
"token": "TOKEN"
|
||||
}
|
||||
@ -95,6 +95,30 @@ if [ ! -f "$CONFIG_PATH" ]; then
|
||||
else
|
||||
sed -i "s/MESSAGE_POST_FORMAT/array/" $CONFIG_PATH
|
||||
fi
|
||||
|
||||
if [ "$HTTP_HOST" ]; then
|
||||
sed -i "s/HTTP_HOST/$HTTP_HOST/" $CONFIG_PATH
|
||||
else
|
||||
sed -i "s/HTTP_HOST//" $CONFIG_PATH
|
||||
fi
|
||||
|
||||
if [ "$WS_HOST" ]; then
|
||||
sed -i "s/WS_HOST/$WS_HOST/" $CONFIG_PATH
|
||||
else
|
||||
sed -i "s/WS_HOST//" $CONFIG_PATH
|
||||
fi
|
||||
|
||||
if [ "$HTTP_HEART_ENABLE" ]; then
|
||||
sed -i "s/HTTP_HEART_ENABLE/$HTTP_HEART_ENABLE/" $CONFIG_PATH
|
||||
else
|
||||
sed -i "s/HTTP_HEART_ENABLE/false/" $CONFIG_PATH
|
||||
fi
|
||||
|
||||
if [ "$MUSIC_SIGN_URL" ]; then
|
||||
sed -i "s/MUSIC_SIGN_URL/$MUSIC_SIGN_URL/" $CONFIG_PATH
|
||||
else
|
||||
sed -i "s/MUSIC_SIGN_URL//" $CONFIG_PATH
|
||||
fi
|
||||
fi
|
||||
|
||||
export FFMPEG_PATH=/usr/bin/ffmpeg
|
||||
|
||||
Loading…
Reference in New Issue
Block a user