From 09f1d56ab13a38d1fad0169ebfde280a62cd2961 Mon Sep 17 00:00:00 2001 From: happygame Date: Mon, 28 Oct 2024 17:15:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=BA=9Bdoc?= =?UTF-8?q?ker=E6=8D=A2=E6=BA=90=E7=9A=84=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/recipe/ware/Docker-Hub.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/recipe/ware/Docker-Hub.c b/src/recipe/ware/Docker-Hub.c index 7ac4abf..2bb25cf 100644 --- a/src/recipe/ware/Docker-Hub.c +++ b/src/recipe/ware/Docker-Hub.c @@ -2,8 +2,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later * ------------------------------------------------------------- * File Authors : Aoran Zeng - * Contributors : Nil Null - * | happy game + * Contributors : happy game * Created On : <2024-06-08> * Last Modified : <2024-10-28> * ------------------------------------------------------------*/ @@ -88,7 +87,7 @@ wr_dockerhub_setsrc (char *option) "\")' ", WARE_DockerHub_SourceConfig); char *ret = xy_run(cmd, 0, NULL); - if (ret && strcmp(ret, "null\n") != 0) + if (ret && !xy_streql(ret, "null\n")) { chsrc_note2 ("已存在源,无需重复添加"); } @@ -128,7 +127,9 @@ wr_dockerhub_setsrc (char *option) // puts (to_add); if (xy_on_linux) { + // 由于 systemctl restart docker 会导致所有容器停止,所以不自动重启 chsrc_note2 ("请自行运行: sudo systemctl restart docker"); + chsrc_note2 ("该命令会重启所有容器, 请在合适的时机执行"); // puts ("sudo systemctl restart docker"); } else