mirror of
https://github.com/thelittlerocket/pve.git
synced 2025-03-03 17:27:17 +08:00
Update build_backend.sh
This commit is contained in:
parent
86aca50a0c
commit
45b5f5bae2
1 changed files with 20 additions and 0 deletions
|
@ -48,3 +48,23 @@ echo "Bridge vmbr1 created!"
|
|||
echo "Creating resource pool mypool..."
|
||||
pvesh create /pools --poolid mypool
|
||||
echo "Resource pool mypool created!"
|
||||
|
||||
# 检测AppArmor模块
|
||||
if ! dpkg -s apparmor > /dev/null 2>&1; then
|
||||
echo "Installing AppArmor..."
|
||||
apt-get update
|
||||
apt-get install -y apparmor
|
||||
fi
|
||||
if ! systemctl is-active --quiet apparmor.service; then
|
||||
echo "Starting AppArmor service..."
|
||||
systemctl enable apparmor.service
|
||||
systemctl start apparmor.service
|
||||
fi
|
||||
if ! lsmod | grep -q apparmor; then
|
||||
echo "Loading AppArmor kernel module..."
|
||||
modprobe apparmor
|
||||
fi
|
||||
if ! lsmod | grep -q apparmor; then
|
||||
echo "AppArmor not loaded, a system reboot may be required."
|
||||
fi
|
||||
echo "AppArmor has been configured."
|
||||
|
|
Loading…
Reference in a new issue