post_install() {
    systemctl enable biglinux-improve-compatibility
    systemctl start biglinux-improve-compatibility
    systemctl enable suspend-bluetooth-fix
    systemctl start suspend-bluetooth-fix
    systemctl enable glibc2-41-fix.path
    systemctl start glibc2-41-fix.path
    systemctl --global enable big-execute-after-user-login
    if [[ ! -e /etc/sysctl.d/90-sysrq.conf ]]; then
       echo 'kernel.sysrq = 502'  > /etc/sysctl.d/90-sysrq.conf
    fi
    if [[ ! -e /etc/systemd/coredump.conf.d/custom.conf ]]; then
        mkdir -p /etc/systemd/coredump.conf.d/
        echo '[Coredump]
Storage=none
ProcessSizeMax=0'  > /etc/systemd/coredump.conf.d/custom.conf
    fi
}

pre_remove() {
    systemctl disable biglinux-improve-compatibility
    systemctl disable suspend-bluetooth-fix
    systemctl disable glibc2-41-fix
} 

post_upgrade() {
    systemctl --global enable big-execute-after-user-login
    systemctl enable suspend-bluetooth-fix
    systemctl start suspend-bluetooth-fix
    systemctl enable glibc2-41-fix.path
    systemctl start glibc2-41-fix.path
    if [[ ! -e /etc/sysctl.d/90-sysrq.conf ]]; then
       echo 'kernel.sysrq = 502'  > /etc/sysctl.d/90-sysrq.conf
    fi
    
    if [[ ! -e /etc/systemd/coredump.conf.d/custom.conf ]]; then
        mkdir -p /etc/systemd/coredump.conf.d/
        echo '[Coredump]
Storage=none
ProcessSizeMax=0'  > /etc/systemd/coredump.conf.d/custom.conf
    fi
}
