post_install() {
    setcap CAP_NET_ADMIN=+ei /usr/bin/warp-svc
    systemctl enable --now warp-svc.service
    systemctl --global enable warp-taskbar.service
    echo ""
    echo "==>"
    echo "==> CAP_NET_ADMIN set on /usr/bin/warp-svc"
    echo "==>"
    echo "==> warp-svc.service has been enabled and started."
    echo "==> warp-taskbar.service has been enabled for all users and will start"
    echo "==> with the next graphical session. To start it right now:"
    echo "==>"
    echo "==>   systemctl --user start warp-taskbar"
    echo "==>"
    echo ""
}

post_upgrade() {
    setcap CAP_NET_ADMIN=+ei /usr/bin/warp-svc
    systemctl try-restart warp-svc.service
}

pre_remove() {
    systemctl disable --now warp-svc.service
    systemctl --global disable warp-taskbar.service
}
