_global_units() { _units=(dirmngr.socket gpg-agent.socket gpg-agent-{browser,extra,ssh}.socket) case $1 in enable) systemctl --global preset ${units[@]} ;; disable) systemctl --global disable ${units[@]} ;; esac } post_install() { # See FS#42798 and FS#47371 dirmngr /dev/null # Let systemd supervise daemons by default _global_units enable } post_upgrade() { if (( $(vercmp $2 2.1.13-1) < 0 )); then echo "==> Please kill running gpg-agent and dirmngr processes before using this release." fi if (( $(vercmp $2 2.1.21-3) < 0 )); then _global_units enable fi } pre_remove() { _global_units disable }