#!/bin/sh

set -e

# Automatically added by dh_installtmpfiles/13.24.2
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
	if [ -x "$(command -v systemd-tmpfiles)" ]; then
		systemd-tmpfiles ${DPKG_ROOT:+--root="$DPKG_ROOT"} --create flatpak.conf || true
	fi
fi
# End automatically added section
# Automatically added by dh_installdeb/13.24.2
dpkg-maintscript-helper rm_conffile /etc/dbus-1/system.d/org.freedesktop.Flatpak.SystemHelper.conf 1.1.1-1\~ flatpak -- "$@"
# End automatically added section


if [ "$1" = configure ]; then
    adduser \
        --force-badname \
        --gecos "Flatpak system-wide installation helper" \
        --group \
        --home /nonexistent \
        --no-create-home \
        --quiet \
        --system \
        _flatpak

    # Run a do-nothing command (it just lists configured remotes) for
    # its side-effect of initializing the shared system-wide repository.
    flatpak remote-list --system >/dev/null || :
fi

exit 0

# vim:set sw=4 sts=4 et:
