mirror of
https://gitee.com/amber-ce/amber-ce-bookworm.git
synced 2025-09-26 05:02:21 +08:00
35 lines
931 B
Bash
Executable File
35 lines
931 B
Bash
Executable File
#!/bin/bash
|
|
export PACKAGE_NAME="$DPKG_MAINTSCRIPT_PACKAGE"
|
|
|
|
if [ "${PACKAGE_NAME}" = "cn.flamescion.bookworm-compatibility-mode" ];then
|
|
PACKAGE_NAME=amber-ce-bookworm # 为了后面正确清理
|
|
if [ -d /opt/apps/cn.flamescion.bookworm-compatibility-mode/ ];then
|
|
|
|
unlink /opt/apps/amber-ce-bookworm
|
|
mv -v /opt/apps/cn.flamescion.bookworm-compatibility-mode/ /opt/apps/amber-ce-bookworm/
|
|
|
|
|
|
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
|
|
# enable kernel.unprivileged_userns_clone
|
|
# disable kernel.apparmor_restrict_unprivileged_unconfined and kernel.apparmor_restrict_unprivileged_userns
|
|
if [ -f /usr/lib/sysctl.d/amber-ce.conf ];then
|
|
sysctl -p /usr/lib/sysctl.d/amber-ce.conf
|
|
fi
|
|
|
|
fi
|
|
|
|
true
|