From 1a874c695aef632fcc9862263126c8a22ddbabe5 Mon Sep 17 00:00:00 2001 From: spiritlhl <103393591+spiritLHLS@users.noreply.github.com> Date: Sun, 30 Jul 2023 19:43:24 +0800 Subject: [PATCH] Update build_backend.sh --- scripts/build_backend.sh | 56 +++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/scripts/build_backend.sh b/scripts/build_backend.sh index 168229a..4e8abad 100644 --- a/scripts/build_backend.sh +++ b/scripts/build_backend.sh @@ -1,7 +1,7 @@ #!/bin/bash # from # https://github.com/spiritLHLS/pve -# 2023.06.29 +# 2023.07.30 # 打印信息 @@ -86,29 +86,31 @@ else fi fi -# 检测AppArmor模块 -if ! dpkg -s apparmor > /dev/null 2>&1; then - _green "AppArmor is being installed..." - _green "正在安装 AppArmor..." - apt-get update - apt-get install -y apparmor -fi -if [ $? -ne 0 ]; then - apt-get install -y apparmor --fix-missing -fi -if ! systemctl is-active --quiet apparmor.service; then - _green "Starting the AppArmor service..." - _green "启动 AppArmor 服务..." - systemctl enable apparmor.service - systemctl start apparmor.service -fi -if ! lsmod | grep -q apparmor; then - _green "Loading AppArmor kernel module..." - _green "正在加载 AppArmor 内核模块..." - modprobe apparmor -fi -if ! lsmod | grep -q apparmor; then - _yellow "AppArmor is still not loaded, please execute reboot to reboot the system to load" - _yellow "AppArmor 仍未加载,请执行 reboot 重新启动系统加载" -fi -echo "1" > "/root/build_backend_pve.txt" \ No newline at end of file +# # 检测AppArmor模块 +# if ! dpkg -s apparmor > /dev/null 2>&1; then +# _green "AppArmor is being installed..." +# _green "正在安装 AppArmor..." +# apt-get update +# apt-get install -y apparmor +# fi +# if [ $? -ne 0 ]; then +# apt-get install -y apparmor --fix-missing +# fi +# if ! systemctl is-active --quiet apparmor.service; then +# _green "Starting the AppArmor service..." +# _green "启动 AppArmor 服务..." +# systemctl enable apparmor.service +# systemctl start apparmor.service +# fi +# if ! lsmod | grep -q apparmor; then +# _green "Loading AppArmor kernel module..." +# _green "正在加载 AppArmor 内核模块..." +# modprobe apparmor +# fi +# if ! lsmod | grep -q apparmor; then +# _yellow "AppArmor is still not loaded, please execute reboot to reboot the system to load" +# _yellow "AppArmor 仍未加载,请执行 reboot 重新启动系统加载" +# fi +_yellow "Please execute reboot to reboot the system to load the PVE kernel." +_yellow "请执行 reboot 重新启动系统加载PVE内核" +echo "1" > "/root/build_backend_pve.txt"