Add post-upgrade script for automatic db upgrade
Closes: OS#5138
Change-Id: I34e943e5020285f63a2162010eb42675af1520bf
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index cfd0b15..37c4aa4 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -2,3 +2,13 @@
systemd \
dgsm \
$(NULL)
+
+EXTRA_DIST = osmo-hlr-post-upgrade.sh
+
+install-data-hook:
+ install -Dm755 $(srcdir)/osmo-hlr-post-upgrade.sh \
+ -t $(DESTDIR)$(datadir)/osmocom/
+
+uninstall-hook:
+ @$(PRE_UNINSTALL)
+ $(RM) $(DESTDIR)$(datadir)/osmocom/osmo-hlr-post-upgrade.sh