#!/bin/bash

## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

#set -x
set -o errexit
set -o nounset
set -o pipefail
set -o errtrace

if [ -f /usr/libexec/helper-scripts/pre.bsh ]; then
   source /usr/libexec/helper-scripts/pre.bsh
fi

true "
####################################################################
## INFO: Begin ${DPKG_MAINTSCRIPT_NAME:-} script ${DPKG_MAINTSCRIPT_PACKAGE:-}...
####################################################################
"

case "${1:-}" in
    configure)
       ## Not using --no-create-home, so sdwdate can write into /home/sdwdate.
       true
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

    *)
        printf '%s\n' "${DPKG_MAINTSCRIPT_NAME:-} called with unknown argument \`${1:-}'" >&2
        exit 1
    ;;
esac

true "INFO: debhelper beginning here."

#DEBHELPER#

true "INFO: Done with debhelper."

true "
####################################################################
## INFO: $DPKG_MAINTSCRIPT_NAME script $DPKG_MAINTSCRIPT_PACKAGE no error detected.
####################################################################
"

## Explicitly "exit 0", so eventually trapped errors can be ignored.
exit 0
