预览版安装

Signed-off-by: 萌森 <qyg2297248353@163.com>
This commit is contained in:
萌森 2024-07-22 18:13:22 +08:00
parent 1177bb2114
commit 4e94a8314e
6 changed files with 51 additions and 4 deletions

View File

@ -2,7 +2,7 @@ name: Alist
title: 文件列表程序
description: 一个支持多种存储的文件列表程序
additionalProperties:
key: alist
key: alist-aria2
name: Alist
tags:
- WebSite

View File

@ -2,7 +2,7 @@ name: Alist
title: 文件列表程序
description: 一个支持多种存储的文件列表程序
additionalProperties:
key: alist
key: alist-ffmpeg
name: Alist
tags:
- WebSite

View File

@ -2,7 +2,7 @@ name: Elasticsearch
title: 分布式、RESTful 风格的搜索和数据分析引擎
description: 分布式、RESTful 风格的搜索和数据分析引擎
additionalProperties:
key: elasticsearch
key: elastic-elasticsearch
name: Elasticsearch
tags:
- Database

View File

@ -2,7 +2,7 @@ name: Kibana
title: 基于浏览器的 Elasticsearch 分析和搜索仪表盘
description: 基于浏览器的 Elasticsearch 分析和搜索仪表盘
additionalProperties:
key: kibana
key: elastic-kibana
name: Kibana
tags:
- WebSite

View File

@ -0,0 +1,43 @@
#!/bin/bash
echo "$(date): Step Tip - Start installing the 1Panel third-party app store"
echo "$(date): Step Init - Checking for required commands..."
check_command() {
command -v "$1" > /dev/null 2>&1 || {
echo >&2 "Error: $1 is not installed. Please install it and try again."
exit 1
}
}
check_command "git"
check_command "cp"
check_command "rm"
check_command "echo"
check_command "which"
check_command "xargs"
check_command "grep"
check_command "cut"
BASE_DIR=$(which 1pctl | xargs grep '^BASE_DIR=' | cut -d'=' -f2)
echo "Step Init - 1panel install directory: $BASE_DIR"
if [ -z "$BASE_DIR" ]; then
echo "Error: 1panel install directory not found."
exit 1
fi
LOCAL_DIR="$BASE_DIR/1panel/resource/apps/local"
echo "$(date): Step 1 - Uninstalling applications..."
for app in "$LOCAL_DIR"/*; do
if [ -d "$app" ]; then
echo "$(date): Step 1 - Uninstalling $(basename "$app")..."
rm -rf "$app"
fi
done
echo "$(date): Step Tip - Uninstalling the 1Panel third-party app store completed!"
echo "$(date): Step Tip - Copyright© 2024 Xinjiang Mengsen Software Development Studio."
echo "$(date): Step Tip - https://blog.lifebus.top/"
echo "$(date): Step Tip - Done!"

View File

@ -63,6 +63,10 @@ for app_directory in "${APPS_DIR:?}"/*; do
echo "$(date): Step 2 - Installed applications $app_name"
echo "$(date): Step 2 - Copied directory $app_directory to $LOCAL_DIR/"
fi
sed -i "s/^ key: ${app_name}/ key: ${app_name_pre}/g" "${LOCAL_DIR:?}/$app_name_pre/data.yml"
sed -i "/^name: /s/name: \(.*\)/name: \1 预览版/" "${LOCAL_DIR:?}/$app_name_pre/data.yml"
sed -i "/^ name: /s/ name: \(.*\)/ name: \1 预览版/" "${LOCAL_DIR:?}/$app_name_pre/data.yml"
done
echo "$(date): Step 3 - Copying envs directory..."