commit 4e2b6dac91eb1c00d43846355879bd56320c359f parent 51363d25376bf4677c08c0ad37ab8c6d34af5e55 Author: Martin Schanzenbach <schanzen@gnunet.org> Date: Tue, 17 Feb 2026 14:55:11 +0100 add postinst for mailbox debian package Diffstat:
| M | debian/changelog | | | 5 | +++++ |
| A | debian/taler-mailbox.postinst | | | 49 | +++++++++++++++++++++++++++++++++++++++++++++++++ |
2 files changed, 54 insertions(+), 0 deletions(-)
diff --git a/debian/changelog b/debian/changelog @@ -1,3 +1,8 @@ +taler-mailbox (1.3.1) UNRELEASED; urgency=medium + + [ Martin Schanzenbach ] + * Bump version + taler-mailbox (1.1.0) UNRELEASED; urgency=medium [ Martin Schanzenbach ] diff --git a/debian/taler-mailbox.postinst b/debian/taler-mailbox.postinst @@ -0,0 +1,49 @@ +#!/bin/bash + +set -e + +if [ -d /run/systemd/system ]; then + systemctl --system daemon-reload >/dev/null || true +fi +if [ "$1" = "remove" ]; then + if [ -x "/usr/bin/deb-systemd-helper" ]; then + deb-systemd-helper mask 'taler-mailbox.service' >/dev/null || true + fi +fi + +if [ "$1" = "purge" ]; then + if [ -x "/usr/bin/deb-systemd-helper" ]; then + deb-systemd-helper purge 'taler-mailbox.service' >/dev/null || true + deb-systemd-helper unmask 'taler-mailbox.service' >/dev/null || true + fi +fi + +TALER_HOME="/var/lib/taler-mailbox" + +. /usr/share/debconf/confmodule + +case "${1}" in +configure) + + # Creating taler users if needed + if ! getent passwd taler-mailbox >/dev/null; then + adduser --quiet --system --ingroup www-data --no-create-home --home ${TALER_HOME} taler-mailbox + fi + + if [ -x /usr/bin/taler-mailbox-dbinit ]; then + /usr/bin/taler-mailbox-dbinit >/dev/null 2>&1 || true + fi + + ;; + +abort-upgrade | abort-remove | abort-deconfigure) ;; + +*) + echo "postinst called with unknown argument \`${1}'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0