Files
fnOS-wechat/install.sh
Dāi méng kǒng lóng 93b0122325 飞牛OS微信聊天记录备份工具
这是一个运行在飞牛OS上的微信聊天记录备份工具
2025-06-02 04:22:18 +08:00

49 lines
1.2 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# 打印彩色信息
function print_info() {
echo -e "\033[36m$1\033[0m"
}
function print_success() {
echo -e "\033[32m$1\033[0m"
}
function print_error() {
echo -e "\033[31m$1\033[0m"
}
print_info "=== 飞牛OS微信备份工具安装脚本 ==="
print_info "正在检查环境..."
# 检查Docker是否安装
if ! command -v docker &> /dev/null; then
print_error "未检测到Docker请先安装Docker。"
exit 1
fi
# 检查Docker Compose是否安装
if ! command -v docker-compose &> /dev/null; then
print_error "未检测到Docker Compose请先安装Docker Compose。"
exit 1
fi
print_success "环境检查通过!"
# 创建数据目录
print_info "创建数据目录..."
mkdir -p data
# 构建并启动容器
print_info "构建并启动容器..."
docker-compose up -d
if [ $? -eq 0 ]; then
print_success "飞牛OS微信备份工具已成功安装"
print_info "您现在可以通过浏览器访问 http://localhost:8888 使用该工具"
print_info "默认用户名: admin"
print_info "默认密码: admin"
print_info "请尽快修改默认密码以确保安全"
else
print_error "安装过程中出现错误,请检查上面的错误信息"
fi