mirror of
https://gitee.com/SuperManito/LinuxMirrors
synced 2025-11-04 00:10:27 +08:00
优化
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
## Author: SuperManito
|
||||
## Modified: 2023-05-10
|
||||
## Modified: 2023-05-12
|
||||
## License: MIT
|
||||
## Github: https://github.com/SuperManito/LinuxMirrors
|
||||
## Website: https://linuxmirrors.cn
|
||||
@@ -444,11 +444,11 @@ function RemoveOldVersion() {
|
||||
sleep 2s
|
||||
case "${SYSTEM_FACTIONS}" in
|
||||
"${SYSTEM_DEBIAN}")
|
||||
apt-get remove -y docker-ce docker-ce-cli containerd.io runc >/dev/null 2>&1
|
||||
apt-get remove -y docker-ce docker-ce-cli containerd.io runc
|
||||
apt-get autoremove -y >/dev/null 2>&1
|
||||
;;
|
||||
"${SYSTEM_REDHAT}" | "${SYSTEM_OPENCLOUDOS}" | "${SYSTEM_OPENEULER}")
|
||||
yum remove -y docker-ce docker-ce-cli containerd.io podman* runc >/dev/null 2>&1
|
||||
yum remove -y docker-ce docker-ce-cli containerd.io podman* runc
|
||||
yum autoremove -y >/dev/null 2>&1
|
||||
;;
|
||||
esac
|
||||
@@ -632,9 +632,9 @@ function DockerEngine() {
|
||||
[[ -z "${INPUT}" ]] && INPUT=Y
|
||||
case $INPUT in
|
||||
[Yy] | [Yy][Ee][Ss])
|
||||
echo -en "\n$WORKING 正在卸载之前的版本..."
|
||||
echo -en "\n$WORKING 正在卸载之前的版本...\n"
|
||||
RemoveOldVersion
|
||||
echo -e "\n\n$COMPLETE 卸载完毕\n"
|
||||
echo -e "\n$COMPLETE 卸载完毕\n"
|
||||
Install
|
||||
;;
|
||||
[Nn] | [Nn][Oo]) ;;
|
||||
@@ -655,7 +655,7 @@ function DockerEngine() {
|
||||
## 查看版本并验证安装结果
|
||||
function CheckVersion() {
|
||||
if [ -x /usr/bin/docker ]; then
|
||||
echo -e "\n$WORKING 验证安装版本...\n"
|
||||
echo -n "\n验证安装版本:"
|
||||
docker -v
|
||||
VERIFICATION_DOCKER=$?
|
||||
if [ ${VERIFICATION_DOCKER} -eq 0 ]; then
|
||||
@@ -682,9 +682,8 @@ function CheckVersion() {
|
||||
systemctl enable --now docker >/dev/null 2>&1
|
||||
sleep 2
|
||||
if [[ $(systemctl is-active docker) != "active" ]]; then
|
||||
echo -e "\n$ERROR 检测到 Docker 服务启动异常,可能由于重复安装相同版本导致"
|
||||
echo -e "\n请执行 systemctl start docker 或 service docker start 命令尝试启动"
|
||||
echo -e "\n官方安装文档:https://docs.docker.com/engine/install"
|
||||
echo -e "\n$ERROR 检测到 Docker 服务启动异常,可能由于重复安装导致"
|
||||
echo -e "\n${YELLOW} 请执行 "systemctl start docker" 或 "service docker start" 命令尝试启动,如若报错请尝试重新执行本脚本${PLAIN}"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<td align="center">30 ~ 38</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.centos.org/centos-linux" target="_blank"><img src="./docs/assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"></a> CentOS</td>
|
||||
<td><a href="https://www.centos.org" target="_blank"><img src="./docs/assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"></a> CentOS</td>
|
||||
<td align="center">7.0 ~ 8.5 / Stream 8 ~ 9</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -43,7 +43,7 @@ GNU/Linux 一键更换系统软件源脚本
|
||||
<td align="center">30 ~ 38</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.centos.org/centos-linux" target="_blank"><img src="/assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.25em"></a> CentOS</td>
|
||||
<td><a href="https://www.centos.org" target="_blank"><img src="/assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.25em"></a> CentOS</td>
|
||||
<td align="center">7.0 ~ 8.5 / Stream 8 ~ 9</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -10,7 +10,7 @@ hide:
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="https://www.debian.org" target="_blank"><img src="/../assets/images/icon/debian.svg" width="16" height="16" style="vertical-align: -0.45em"/></a> Debian</td>
|
||||
<td><a href="https://www.centos.org/centos-linux" target="_blank"><img src="/../assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a> CentOS</td>
|
||||
<td><a href="https://www.centos.org" target="_blank"><img src="/../assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a> CentOS</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://cn.ubuntu.com" target="_blank"><img src="/../assets/images/icon/ubuntu.svg" width="16" height="16" style="vertical-align: -0.15em"/></a> Ubuntu</td>
|
||||
|
||||
@@ -59,7 +59,7 @@ bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
|
||||
<td align="center">fedora</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://www.centos.org/centos-linux" target="_blank"><img src="/../assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a> CentOS</td>
|
||||
<td><a href="https://www.centos.org" target="_blank"><img src="/../assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a> CentOS</td>
|
||||
<td align="center">centos/centos-stream/centos-altarch/centos-vault</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user