#!/bin/sh
set -e

#DEBHELPER#

# Sigil hardening (#10): create the sigil group/user + own the dirs. Guarded so
# non-systemd hosts no-op. Idempotent (sysusers/tmpfiles are declarative).
if command -v systemd-sysusers >/dev/null 2>&1; then
    systemd-sysusers /usr/lib/sysusers.d/sigil.conf >/dev/null 2>&1 || true
fi
if command -v systemd-tmpfiles >/dev/null 2>&1; then
    systemd-tmpfiles --create /usr/lib/tmpfiles.d/sigil.conf >/dev/null 2>&1 || true
fi

exit 0
