post_install() {
  cat <<'EOF'
NOTE: Before starting Koito, complete these steps:

  1) Edit /etc/koito.env to configure your environment variables (e.g., KOITO_ALLOWED_HOSTS).
  2) Reload systemd and enable/start the service:
       # systemctl daemon-reload
       # systemctl enable --now koito.service

Enjoy Koito!
EOF
}

post_upgrade() {
  if [[ $(vercmp "$2" "0.2.1") -lt 0 ]]; then
    cat <<'EOF'
========================================================================
                            CRITICAL WARNING
========================================================================
You are upgrading from a version older than v0.2.1.
Upstream has ENTIRELY removed PostgreSQL code in this release.

You MUST first downgrade/install v0.2.1 to automatically migrate your
database from PostgreSQL to SQLite. Failure to do so will result in
immediate service failure and potential data loss.
========================================================================
EOF
  fi

  if [[ $(vercmp "$2" "0.3.1") -lt 0 ]]; then
    cat <<'EOF'
========================================================================
                         IMAGE CACHE MIGRATION
========================================================================
Koito v0.3.1 introduces a brand-new image cache system.

While tested, there is a minor risk of data/image loss during migration.
PLEASE BACKUP YOUR DATA FOLDER (/var/lib/koito) BEFORE RESTARTING!
========================================================================
EOF
  fi
}
