From d6dbc62e72290f5d5705e851f1e8c988248dc601 Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 29 Apr 2024 22:19:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E8=BD=BD=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DEBIAN/postinst | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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