From 58909a312612d57e5a38fcf15f7ea24f4b49801d Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 2 Dec 2014 11:59:07 +0000 Subject: [PATCH] postinst/postrm script for Debian package MKX-6 - part 4 --- debian/control | 2 +- debian/postinst | 17 +++++++++++++++++ debian/postrm | 17 +++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 debian/postinst create mode 100644 debian/postrm diff --git a/debian/control b/debian/control index 8dd0a91..e5f7360 100644 --- a/debian/control +++ b/debian/control @@ -13,6 +13,6 @@ Build-Depends: debhelper (>= 7), Package: mp-xquery Section: libs Architecture: any -Depends: ${shlibs:Depends} +Depends: metaproxy6, ${shlibs:Depends} Description: metaproxy module record manipulation module for Metaproxy diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..e62ea4f --- /dev/null +++ b/debian/postinst @@ -0,0 +1,17 @@ +#!/bin/sh +set -e + +if [ "$1" != "configure" ]; then + exit 0 +fi + +F=metaproxy_filter_xquery.so +if [ -d /usr/lib/metaproxy6/modules ]; then + if [ ! -e /usr/lib/metaproxy6/modules/$F ]; then + ln -sf /usr/lib/mp-xquery/$F /usr/lib/metaproxy6/modules + fi + if [ -f /var/run/metaproxy.pid ]; then + invoke-rc.d metaproxy force-reload + fi +fi +exit 0 diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..95ca888 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,17 @@ +#!/bin/sh -e +F=metaproxy_filter_xquery.so +case "$1" in + purge) + rm -f /usr/lib/metaproxy6/modules/$F + if [ -f /var/run/metaproxy.pid ]; then + invoke-rc.d metaproxy force-reload + fi + ;; + remove) + rm -f /usr/lib/metaproxy6/modules/$F + if [ -f /var/run/metaproxy.pid ]; then + invoke-rc.d metaproxy force-reload + fi + ;; +esac +exit 0 -- 1.7.10.4