From 577fb370a7537046cb7246d877d604d48c0344ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Tue, 15 Oct 2024 00:44:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8F=91=E5=B8=83v2.3.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/apps/mysql/service.go | 8 ++++---- internal/bootstrap/conf.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/apps/mysql/service.go b/internal/apps/mysql/service.go index 370b23351f..3f5be6df1d 100644 --- a/internal/apps/mysql/service.go +++ b/internal/apps/mysql/service.go @@ -49,13 +49,13 @@ func (s *Service) UpdateConfig(w http.ResponseWriter, r *http.Request) { return } - if err := io.Write(app.Root+"/server/mysql/conf/my.cnf", req.Config, 0644); err != nil { - service.Error(w, http.StatusInternalServerError, "写入配置失败") + if err = io.Write(app.Root+"/server/mysql/conf/my.cnf", req.Config, 0644); err != nil { + service.Error(w, http.StatusInternalServerError, "写入配置失败:%v", err) return } - if err := systemctl.Reload("mysqld"); err != nil { - service.Error(w, http.StatusInternalServerError, "重载失败") + if err = systemctl.Restart("mysqld"); err != nil { + service.Error(w, http.StatusInternalServerError, "重启失败:%v", err) return } diff --git a/internal/bootstrap/conf.go b/internal/bootstrap/conf.go index 7274bd8927..e11cf694d2 100644 --- a/internal/bootstrap/conf.go +++ b/internal/bootstrap/conf.go @@ -26,7 +26,7 @@ func initConf() { func initGlobal() { app.Root = app.Conf.MustString("app.root") - app.Version = "2.3.3" + app.Version = "2.3.4" app.Locale = app.Conf.MustString("app.locale") // 初始化时区