#!/bin/sh

set -e

adduser --quiet --system \
        --home /run/systemd --no-create-home \
        --gecos "systemd Journal Gateway" \
        --group systemd-journal-gateway

adduser --quiet --system \
        --home /run/systemd --no-create-home \
        --gecos "systemd Journal Remote" \
        --group systemd-journal-remote

adduser --quiet --system \
        --home /run/systemd --no-create-home \
        --gecos "systemd Journal Upload" \
        --group systemd-journal-upload

# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; 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 /usr/lib/tmpfiles.d/systemd-remote.conf >/dev/null || true
	fi
fi
# End automatically added section

