_info() {
    echo -e "\033[32m:: linyaps getting started:\033[0m"
    echo -e "\033[32m:: linyaps 入门:\033[0m"
    echo -e "   \033[32mEnglish: https://linyaps.org.cn/en/guide/start/whatis.html\033[0m"
    echo -e "   \033[32m简中: https://linyaps.org.cn/guide/start/whatis.html\033[0m"
}

_en_ll() {
    systemctl daemon-reload
    systemctl enable org.deepin.linglong.PackageManager.service 2>/dev/null || true
    systemctl start org.deepin.linglong.PackageManager.service 2>/dev/null || true
}

_dis_ll() {
    systemctl stop org.deepin.linglong.PackageManager.service 2>/dev/null || true
    systemctl disable org.deepin.linglong.PackageManager.service 2>/dev/null || true
}

#post_install() {
#    _info
#    _en_ll
#}

pre_upgrade() {
    _info
    _dis_ll
}

post_upgrade() {
    _info
    _en_ll
}

pre_remove() {
    _dis_ll
}
