From 3f9aa48db4320704b35dadb0499dbefd2cafb739 Mon Sep 17 00:00:00 2001 From: hylom Date: Mon, 5 Dec 2016 19:03:23 +0900 Subject: [PATCH] debian: add post-install/pre-rm script --- debian/newslash-sradjp.postinst | 41 +++++++++++++++++++++++++++++++++++++++++ debian/newslash-sradjp.prerm | 28 ++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 debian/newslash-sradjp.postinst create mode 100644 debian/newslash-sradjp.prerm diff --git a/debian/newslash-sradjp.postinst b/debian/newslash-sradjp.postinst new file mode 100644 index 00000000..87d24464 --- /dev/null +++ b/debian/newslash-sradjp.postinst @@ -0,0 +1,41 @@ +#! /bin/sh +# postinst script for slash +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# + +case "$1" in + configure) + systemctl daemon-reload + systemctl start newslash + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/debian/newslash-sradjp.prerm b/debian/newslash-sradjp.prerm new file mode 100644 index 00000000..cc3baae7 --- /dev/null +++ b/debian/newslash-sradjp.prerm @@ -0,0 +1,28 @@ +#! /bin/sh +# postinst script for slash +# +# see: dh_installdeb(1) + +set -e + +case "$1" in + remove|upgrade) + systemctl stop newslash + ;; + + deconfigure|failed-upgrade) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 -- 2.11.0