Merge QYG2297248353/appstore-1panel into pooneyy/1Panel-Appstore
This commit is contained in:
2
apps/artalk/2.9.1/envs/default.env
Normal file
2
apps/artalk/2.9.1/envs/default.env
Normal file
@@ -0,0 +1,2 @@
|
||||
# copyright© 2024 XinJiang Ms Studio
|
||||
ENV_FILE=.env
|
||||
2
apps/artalk/2.9.1/envs/global.env
Normal file
2
apps/artalk/2.9.1/envs/global.env
Normal file
@@ -0,0 +1,2 @@
|
||||
# copyright© 2024 XinJiang Ms Studio
|
||||
TZ=Asia/Shanghai
|
||||
30
apps/artalk/2.9.1/scripts/init.sh
Normal file
30
apps/artalk/2.9.1/scripts/init.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
# setup-1 add default values
|
||||
CURRENT_DIR=$(pwd)
|
||||
sed -i '/^ENV_FILE=/d' .env
|
||||
sed -i '/^GLOBAL_ENV_FILE=/d' .env
|
||||
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
|
||||
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.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
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
10
apps/artalk/2.9.1/scripts/uninstall.sh
Normal file
10
apps/artalk/2.9.1/scripts/uninstall.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
30
apps/artalk/2.9.1/scripts/upgrade.sh
Normal file
30
apps/artalk/2.9.1/scripts/upgrade.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
# setup-1 add default values
|
||||
CURRENT_DIR=$(pwd)
|
||||
sed -i '/^ENV_FILE=/d' .env
|
||||
sed -i '/^GLOBAL_ENV_FILE=/d' .env
|
||||
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
|
||||
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.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
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
Reference in New Issue
Block a user