diff --git a/src/DEBIAN/postinst b/src/DEBIAN/postinst index b62a5d2..4008294 100755 --- a/src/DEBIAN/postinst +++ b/src/DEBIAN/postinst @@ -20,4 +20,17 @@ systemctl start ace-bookworm-auto-upgrade fi -true \ No newline at end of file + +# 检查apparmor服务的状态 +apparmor_status=$(systemctl is-active apparmor) + +# 检查服务是否正在运行 +if [ "$apparmor_status" == "active" ]; then + echo "AppArmor 服务正在运行,执行重载配置..." + +systemctl reload apparmor +else + echo "AppArmor 服务没有运行。无需冲在配置" +fi + +true