#!/bin/sh set -e . /usr/share/debconf/confmodule OUT=/dev/null if [ "$1" = configure ]; then # lets give them a user/group in all cases. if ! getent passwd custodia > $OUT; then adduser --quiet --system --home /var/lib/custodia \ --disabled-password --group \ --gecos "Custodia user" \ --no-create-home \ custodia > $OUT fi chown -R custodia:custodia /etc/custodia /var/lib/custodia /var/log/custodia /var/run/custodia > $OUT || true chmod 600 /etc/custodia/custodia.conf > $OUT || true chmod 700 /etc/custodia /var/lib/custodia /var/log/custodia > $OUT || true chmod 755 /var/run/custodia > $OUT || true fi # Automatically added by dh_installsystemd/12.9 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then # In case this system is running systemd, we need to ensure that all # necessary tmpfiles (if any) are created before starting. if [ -d /run/systemd/system ] ; then systemd-tmpfiles --create custodia.conf >/dev/null || true fi fi # End automatically added section