#! /bin/bash
set -e
#include <genscript.warning>
#include <dumpall_loc.inc>
#include <savebin.inc>

PKGVERSION=%PG_VERSION%

if [ "$1" = remove -o "$1" = upgrade ]
then
    # Save the necessary files, in case the next release
    # needs a dump and restore
    for i in /usr/lib/postgresql/bin/{pg_dump,pg_dumpall,psql}
    do
	save_bin $i
    done
    save_file /etc/postgresql/postgresql.env
fi

#DEBHELPER#
