From: hylom Date: Mon, 5 Dec 2016 10:03:23 +0000 (+0900) Subject: debian: add post-install/pre-rm script X-Git-Tag: v0.1.1~1084 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=3f9aa48db4320704b35dadb0499dbefd2cafb739;p=newslash%2Fnewslash.git debian: add post-install/pre-rm script --- 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