From 19b578ee911766e8fa8832bd02a1ae39d32d246c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=8C=E6=A3=AE?= Date: Mon, 2 Sep 2024 16:43:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E5=BA=94=E7=94=A8=20Artalk?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 萌森 --- .github/README.md | 1 + README.md | 1 + apps/artalk/2.8.7/scripts/init.sh | 13 +++++++++++++ apps/artalk/2.8.7/scripts/upgrade.sh | 13 +++++++++++++ apps/artalk/data.yml | 2 +- 5 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/README.md b/.github/README.md index 443b78d73..2c0cb39a9 100644 --- a/.github/README.md +++ b/.github/README.md @@ -84,6 +84,7 @@ |:--:|:------------------------------------------------------------------------------------------------:|:-----------------------:|:-------------------------------------------------------------:|:---------------------------------------------------------------------|:-------:| | 🟢 | | 异次元店铺系统 | https://faka.wiki/ | 二次元发卡系统 | | | 🟢 | | AList | https://alist.nn.ci/ | 一款支持多重存储的文件列表程序 | | +| 🟢 | | Artalk | https://artalk.js.org/ | 一个自托管的评论系统 | | | 🟢 | | Bark | https://bark.day.app/ | 一款注重隐私、安全可控的自定义通知推送工具 | | | 🟢 | | Casdoor | https://casdoor.org/ | 身份和访问管理(IAM)/单点登录(SSO)平台 | | | 🟢 | | Cookie Cloud | https://github.com/easychen/CookieCloud/ | CookieCloud是一个和自架服务器同步浏览器Cookie和LocalStorage的小工具 | | diff --git a/README.md b/README.md index f9cb7daba..24192ef33 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ |:--:|:------------------------------------------------------------------------------------------------:|:-----------------------:|:-------------------------------------------------------------:|:---------------------------------------------------------------------|:-------:| | 🟢 | | 异次元店铺系统 | https://faka.wiki/ | 二次元发卡系统 | | | 🟢 | | AList | https://alist.nn.ci/ | 一款支持多重存储的文件列表程序 | | +| 🟢 | | Artalk | https://artalk.js.org/ | 一个自托管的评论系统 | | | 🟢 | | Bark | https://bark.day.app/ | 一款注重隐私、安全可控的自定义通知推送工具 | | | 🟢 | | Casdoor | https://casdoor.org/ | 身份和访问管理(IAM)/单点登录(SSO)平台 | | | 🟢 | | Cookie Cloud | https://github.com/easychen/CookieCloud/ | CookieCloud是一个和自架服务器同步浏览器Cookie和LocalStorage的小工具 | | diff --git a/apps/artalk/2.8.7/scripts/init.sh b/apps/artalk/2.8.7/scripts/init.sh index 77b849120..2b0096c5b 100644 --- a/apps/artalk/2.8.7/scripts/init.sh +++ b/apps/artalk/2.8.7/scripts/init.sh @@ -8,6 +8,19 @@ if [ -f .env ]; then sed -i '/^ENV_FILE=/d' .env echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + DATA_DIR="$ARTALK_ROOT_PATH/data" + + mkdir -p "$DATA_DIR" + + OUTPUT_FILE="$DATA_DIR/ip2region.xdb" + + URL1="https://gh-proxy.com/?q=https%3A%2F%2Fgithub.com%2Flionsoul2014%2Fip2region%2Fblob%2Fmaster%2Fdata%2Fip2region.xdb" + URL2="https://github.com/lionsoul2014/ip2region/raw/master/data/ip2region.xdb" + + curl -L "$URL1" -o "$OUTPUT_FILE" || curl -L "$URL2" -o "$OUTPUT_FILE" + + chmod -R 777 "$DATA_DIR" + echo "Check Finish." else diff --git a/apps/artalk/2.8.7/scripts/upgrade.sh b/apps/artalk/2.8.7/scripts/upgrade.sh index 77b849120..2b0096c5b 100644 --- a/apps/artalk/2.8.7/scripts/upgrade.sh +++ b/apps/artalk/2.8.7/scripts/upgrade.sh @@ -8,6 +8,19 @@ if [ -f .env ]; then sed -i '/^ENV_FILE=/d' .env echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + DATA_DIR="$ARTALK_ROOT_PATH/data" + + mkdir -p "$DATA_DIR" + + OUTPUT_FILE="$DATA_DIR/ip2region.xdb" + + URL1="https://gh-proxy.com/?q=https%3A%2F%2Fgithub.com%2Flionsoul2014%2Fip2region%2Fblob%2Fmaster%2Fdata%2Fip2region.xdb" + URL2="https://github.com/lionsoul2014/ip2region/raw/master/data/ip2region.xdb" + + curl -L "$URL1" -o "$OUTPUT_FILE" || curl -L "$URL2" -o "$OUTPUT_FILE" + + chmod -R 777 "$DATA_DIR" + echo "Check Finish." else diff --git a/apps/artalk/data.yml b/apps/artalk/data.yml index 91e2b412d..a36a66c34 100644 --- a/apps/artalk/data.yml +++ b/apps/artalk/data.yml @@ -15,5 +15,5 @@ additionalProperties: crossVersionUpdate: true limit: 0 website: https://artalk.js.org/ - github: https://github.com/ArtalkJS/Artalk + github: https://github.com/ArtalkJS/Artalk/ document: https://artalk.js.org/guide/intro.html