#!/bin/sh # postinst script for barman set -e case "$1" in configure) # Add barman to /etc/aliases on install; not on upgrade if [ -z "$2" ]; then if [ -f /etc/aliases ] || [ -L /etc/aliases ]; then if ! grep -qi "^barman[[:space:]]*:" /etc/aliases; then echo "barman: root" >> /etc/aliases test -x "$(command -v newaliases)" && newaliases || : fi fi fi # sysusers.d never fixes users that already exist. # 3.20.0-1 used "u!". On systemd 257+ this sets an expiry date # and blocks cron and archive-wal. Clear it: sysusers now uses # plain "u". if [ -n "$2" ]; then chage -E -1 barman 2>/dev/null || : fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0