#!/bin/bash

#shellcheck disable=SC1091
source /usr/bin/xivo-upgrade-functions

distribution="bookworm"

if [ "$XIVOCC_VERSION_INSTALLED" \> "2025.07.00" ]; then
        exit 0
fi

if ! grep -qr "${distribution}-pgdg" /etc/apt/sources.list.d/*; then
        add_postgresql_sources_list "${distribution}"
fi

apt update

exit 0
