# Runs with the target root as the current directory.

_post() {
    systemd-sysusers --root=. || echo "warning: systemd-sysusers failed"
    if [ "$(pwd -P)" = / ]; then
        if usr/bin/sshd -t; then
            echo "note: configuration OK; 'systemctl restart sshd' to run the new sshd"
        else
            echo "warning: 'sshd -t' failed: fix /etc/ssh/sshd_config before restarting sshd"
        fi
    fi
}

post_install() { _post; }
post_upgrade() { _post; }
