# old version (without -$pkgrel): ${1%%-*}
# new version (without -$pkgrel): ${2%%-*}

PKGNAME="securlogon"

# arg 1:  the new package version
pre_install() {
    pre_upgrade $@
}

# arg 1:  the new package version
post_install() {
    post_upgrade $@
}

# arg 1:  the new package version
# arg 2:  the old package version
pre_upgrade() {
    true
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
    /opt/Aladdin/SecureAdmin/plistconf
    if which systemctl &>/dev/null; then
        systemctl --quiet try-restart pcscd.service &>/dev/null
    fi
    return 0
}

# arg 1:  the old package version
pre_remove() {
    true
}

# arg 1:  the old package version
post_remove() {
    if which systemctl &>/dev/null; then
        systemctl --quiet try-restart pcscd.service &>/dev/null
    fi
}


