Add post-upgrade script for automatic db upgrade

Closes: OS#5138
Change-Id: I34e943e5020285f63a2162010eb42675af1520bf
diff --git a/debian/osmo-hlr.install b/debian/osmo-hlr.install
index 1b2cb56..421d5f4 100644
--- a/debian/osmo-hlr.install
+++ b/debian/osmo-hlr.install
@@ -5,4 +5,5 @@
 /usr/share/doc/osmo-hlr/sql/hlr.sql
 /usr/share/doc/osmo-hlr/sql/hlr_data.sql
 /usr/share/doc/osmo-hlr/examples/osmo-hlr.cfg
+/usr/share/osmocom/osmo-hlr-post-upgrade.sh
 /var/lib/osmocom
diff --git a/debian/postinst b/debian/postinst
new file mode 100755
index 0000000..390d304
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,5 @@
+#!/bin/sh -e
+# Debian's postinst script is called on both installation and upgrade. Call the
+# post-upgrade script in both cases, it won't do anything if there is nothing
+# to do.
+/usr/share/osmocom/osmo-hlr-post-upgrade.sh