From 17bb8ad62bc02ba89ddcd0a9364bd0181c4a35f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Sun, 16 Jun 2024 04:20:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20debian=E4=B8=8B=E7=BC=BA=E5=A4=B1podman?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/app.go | 1 + scripts/podman/install.sh | 4 +++- scripts/update_panel.sh | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config/app.go b/config/app.go index 542588e3..63bfa273 100644 --- a/config/app.go +++ b/config/app.go @@ -33,6 +33,7 @@ import ( func Boot() {} func init() { + support.RootPath = "/www/panel" // TODO remove this line config := facades.Config() config.Add("app", map[string]any{ // Application Name diff --git a/scripts/podman/install.sh b/scripts/podman/install.sh index 837f6875..c8cb93a2 100644 --- a/scripts/podman/install.sh +++ b/scripts/podman/install.sh @@ -27,7 +27,9 @@ if [ "${OS}" == "centos" ]; then dnf install podman -y elif [ "${OS}" == "debian" ]; then apt-get update - apt-get install podman -y + apt-get install podman containers-storage -y + # Debian下不清楚是不是Bug,需要手动复制存储配置到正确位置 + cp /usr/share/containers/storage.conf /etc/containers/storage.conf else echo -e $HR echo "错误:耗子面板不支持该系统" diff --git a/scripts/update_panel.sh b/scripts/update_panel.sh index 4e514566..aac16a5c 100644 --- a/scripts/update_panel.sh +++ b/scripts/update_panel.sh @@ -111,6 +111,10 @@ if version_lt "$oldVersion" "2.2.9"; then echo "Update panel to v2.2.9 ..." if [ -f "/usr/bin/podman" ]; then panel writePlugin podman 4.0.0 + if [ "${OS}" == "debian" ]; then + apt-get install podman containers-storage -y + cp /usr/share/containers/storage.conf /etc/containers/storage.conf + fi systemctl enable podman systemctl enable podman-restart systemctl start podman