mirror of
https://github.com/certd/certd.git
synced 2026-04-24 12:27:25 +08:00
chore: 优化安装脚本
This commit is contained in:
@@ -98,7 +98,7 @@ https://certd.handfree.work/
|
|||||||
|
|
||||||
5. 【推荐】[一键安装脚本](https://certd.docmirror.cn/guide/install/docker/)(自动安装 Docker,Certd):
|
5. 【推荐】[一键安装脚本](https://certd.docmirror.cn/guide/install/docker/)(自动安装 Docker,Certd):
|
||||||
```bash
|
```bash
|
||||||
curl -fsSL https://raw.atomgit.com/certd/certd/raw/v2/docker/run/install.sh | bash
|
curl -fsSL https://gitee.com/certd/certd/raw/v2/docker/run/install.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
6. 【不推荐】[源码方式部署 ](https://certd.docmirror.cn/guide/install/source/)
|
6. 【不推荐】[源码方式部署 ](https://certd.docmirror.cn/guide/install/source/)
|
||||||
|
|||||||
+5
-19
@@ -3,7 +3,7 @@ set -e
|
|||||||
|
|
||||||
CERTD_VERSION="${CERTD_VERSION:-latest}"
|
CERTD_VERSION="${CERTD_VERSION:-latest}"
|
||||||
INSTALL_DIR="${INSTALL_DIR:-/opt/certd}"
|
INSTALL_DIR="${INSTALL_DIR:-/opt/certd}"
|
||||||
COMPOSE_FILE_URL="https://raw.atomgit.com/certd/certd/raw/v2/docker/run/docker-compose.yaml"
|
COMPOSE_FILE_URL="https://gitee.com/certd/certd/raw/v2/docker/run/docker-compose.yaml"
|
||||||
COMPOSE_FILE="$INSTALL_DIR/docker-compose.yaml"
|
COMPOSE_FILE="$INSTALL_DIR/docker-compose.yaml"
|
||||||
|
|
||||||
DOCKER_MIRROR="https://mirrors.aliyun.com"
|
DOCKER_MIRROR="https://mirrors.aliyun.com"
|
||||||
@@ -320,29 +320,15 @@ main() {
|
|||||||
COMPOSE_INSTALLED=true
|
COMPOSE_INSTALLED=true
|
||||||
|
|
||||||
if ! check_docker; then
|
if ! check_docker; then
|
||||||
DOCKER_INSTALLED=false
|
|
||||||
echo ""
|
echo ""
|
||||||
read -p "是否安装 Docker? (y/n): " -n 1 -r
|
log_info "正在安装 Docker..."
|
||||||
echo ""
|
install_docker
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
||||||
install_docker
|
|
||||||
else
|
|
||||||
log_error "Docker 是必需组件,脚本退出"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! check_docker_compose; then
|
if ! check_docker_compose; then
|
||||||
COMPOSE_INSTALLED=false
|
|
||||||
echo ""
|
echo ""
|
||||||
read -p "是否安装 Docker Compose? (y/n): " -n 1 -r
|
log_info "正在安装 Docker Compose..."
|
||||||
echo ""
|
install_docker_compose
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
||||||
install_docker_compose
|
|
||||||
else
|
|
||||||
log_error "Docker Compose 是必需组件,脚本退出"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
download_compose_file
|
download_compose_file
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
如果您的服务器未安装 Docker,该脚本会自动为您安装 Docker 和 Docker Compose,并启动 Certd 容器。
|
如果您的服务器未安装 Docker,该脚本会自动为您安装 Docker 和 Docker Compose,并启动 Certd 容器。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
curl -fsSL https://raw.atomgit.com/certd/certd/raw/v2/docker/run/install.sh | bash
|
curl -fsSL https://gitee.com/certd/certd/raw/v2/docker/run/install.sh | bash
|
||||||
```
|
```
|
||||||
|
|
||||||
> 支持 Ubuntu、Debian、CentOS、Rocky Linux、AlmaLinux 等主流发行版。
|
> 支持 Ubuntu、Debian、CentOS、Rocky Linux、AlmaLinux 等主流发行版。
|
||||||
|
|||||||
Reference in New Issue
Block a user