This commit is contained in:
SuperManito
2022-11-02 06:31:59 +08:00
parent 3e4717952d
commit 333a6ff28f

View File

@@ -486,13 +486,13 @@ function ShowVersion() {
esac
exit
fi
if [[ $(systemctl is-active docker) == "active" ]]; then
if [[ $(systemctl is-active docker) != "active" ]]; then
sleep 2
systemctl disable --now docker >/dev/null 2>&1
sleep 2
systemctl enable --now docker >/dev/null 2>&1
sleep 2
if [[ $(systemctl is-active docker) == "active" ]]; then
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"