mirror of
https://github.com/NapNeko/NapCat-Docker.git
synced 2025-12-19 14:41:33 +08:00
fix(entrypoint.sh): startup failed by mount volume (close #18)
This commit is contained in:
parent
d79260a6e2
commit
93ffb8486a
@ -12,16 +12,18 @@ chech_quotes(){
|
|||||||
echo $input
|
echo $input
|
||||||
}
|
}
|
||||||
|
|
||||||
CONFIG_PATH=napcat/config/onebot11_$ACCOUNT.json
|
# 安装 napcat
|
||||||
# 容器首次启动时执行
|
if [ ! -f "napcat/napcat.cjs" ]; then
|
||||||
if [ ! -f "$CONFIG_PATH" ]; then
|
|
||||||
# 安装 napcat
|
|
||||||
rarch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/x64/)
|
rarch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/x64/)
|
||||||
unzip -q NapCat.linux.${rarch}.zip
|
unzip -q NapCat.linux.${rarch}.zip
|
||||||
mv NapCat.linux.${rarch}/config/* napcat/config/ && rmdir NapCat.linux.${rarch}/config
|
mv NapCat.linux.${rarch}/config/* napcat/config/ && rmdir NapCat.linux.${rarch}/config
|
||||||
mv NapCat.linux.${rarch}/* napcat/
|
mv NapCat.linux.${rarch}/* napcat/
|
||||||
chmod +x napcat/napcat.sh
|
chmod +x napcat/napcat.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
CONFIG_PATH=napcat/config/onebot11_$ACCOUNT.json
|
||||||
|
# 容器首次启动时执行
|
||||||
|
if [ ! -f "$CONFIG_PATH" ]; then
|
||||||
if [ "$WEBUI_TOKEN" ]; then
|
if [ "$WEBUI_TOKEN" ]; then
|
||||||
echo "{\"port\": 6099,\"token\": \"$WEBUI_TOKEN\",\"loginRate\": 3}" > napcat/config/webui.json
|
echo "{\"port\": 6099,\"token\": \"$WEBUI_TOKEN\",\"loginRate\": 3}" > napcat/config/webui.json
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user