Skip to content

Commit

Permalink
0.9.9.1
Browse files Browse the repository at this point in the history
#####
1, 更新脚本

#####
  • Loading branch information
Xingsandesu committed Jan 20, 2024
1 parent fd20e77 commit ff98871
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions .shell/get-taichi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -974,27 +974,23 @@ python_update_taichi() {
systemctl start taichi
systemctl daemon-reload
}
systemd_status=$(systemctl is-active taichi 2>/dev/null || true)
docker_status=$(docker ps --filter "name=taichi" --format "{{.Status}}" 2>/dev/null || true)

# 检查 systemd 服务状态
systemd_status=$(systemctl is-active taichi 2>/dev/null)

# 检查 Docker 容器状态
docker_status=$(docker ps --filter "name=taichi" --format "{{.Status}}" 2>/dev/null)

# 设置默认状态为未安装
status="未安装"

# 检查服务和容器的状态,如果存在,则更新状态
if [ "$systemd_status" = "active" ]; then
status="Systemd 服务 'taichi' \e[32m已安装\e[0m"
elif [ -n "$docker_status" ]; then
status="Docker 容器 'taichi' \e[32m已安装\e[0m"
if [ -n "$systemd_status" ]; then
status="Systemd 服务 'taichi' 状态: $systemd_status"
fi

if [ -n "$docker_status" ]; then
status="Docker 容器 'taichi' 状态: $docker_status"
fi

echo "=========太极OS========="
echo "WIKI: https://github.com/Xingsandesu/TaiChi_OS"
echo "官方软件源: https://app.kookoo.top"
echo "当前状态:$status"
echo "$status"
echo "========================"

echo "请选择操作:"
Expand All @@ -1009,7 +1005,7 @@ echo "8. 更换软件源"
echo "9. 使用Docker安装(AMD64, ARM64 如果遇到没有对应glibc库,使用Docker安装,文件管理需要自己指定映射目录)"
echo "10. 源码安装(适用于所有架构)"
echo "11. 源码更新"
echo "12. 源码更新"
echo "12. 查看状态"
echo "========================"

read -p "请输入你的选择(1-12):" operation
Expand Down

0 comments on commit ff98871

Please sign in to comment.