mirror of
https://gitee.com/amber-ce/amber-ce-bookworm.git
synced 2025-12-14 02:52:04 +08:00
37 lines
1.1 KiB
Bash
Executable File
37 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
export PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE"
|
|
|
|
if [ "${PACKAGE_NAME}" = "cn.flamescion.bookworm-compatibility-mode" ];then
|
|
if [ -d /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env ];then
|
|
|
|
mv /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/ace-env
|
|
ln -sfv /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/ace-env /opt/apps/cn.flamescion.bookworm-compatibility-mode/files/bookworm-env
|
|
|
|
|
|
fi
|
|
fi
|
|
|
|
/opt/apps/$PACKAGE_NAME/files/bin/ace-init
|
|
|
|
if [ "${PACKAGE_NAME}" = "cn.flamescion.bookworm-compatibility-mode" ];then
|
|
systemctl daemon-reload
|
|
systemctl enable ace-bookworm-auto-upgrade
|
|
systemctl start ace-bookworm-auto-upgrade
|
|
fi
|
|
|
|
|
|
|
|
# 检查apparmor服务的状态
|
|
apparmor_status=$(systemctl is-active apparmor)
|
|
|
|
# 检查服务是否正在运行
|
|
if [ "$apparmor_status" == "active" ]; then
|
|
echo "AppArmor 服务正在运行,执行重载配置..."
|
|
|
|
systemctl reload apparmor
|
|
else
|
|
echo "AppArmor 服务没有运行。无需重载配置"
|
|
fi
|
|
|
|
true
|