#!/bin/bash

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

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

set -e

true "
#####################################################################
## INFO: BEGIN: $DPKG_MAINTSCRIPT_PACKAGE $DPKG_MAINTSCRIPT_NAME $@
#####################################################################
"

case "$1" in
   configure)
      true "INFO: Configuring $DPKG_MAINTSCRIPT_PACKAGE..."

      mkdir --parents "/var/cache/setup-dist/status-files"
      chmod g+w "/var/cache/setup-dist/status-files"
      chmod o+w "/var/cache/setup-dist/status-files"

      true "INFO: End configuring $DPKG_MAINTSCRIPT_PACKAGE."

      ;;

   *)
      ;;
esac

true "INFO: debhelper beginning here."

# Automatically added by dh_installdeb/13.24.2
dpkg-maintscript-helper rm_conffile /etc/sudoers.d/whonix-setup-wizard -- "$@"
dpkg-maintscript-helper rm_conffile /etc/xdg/autostart/whonix-setup-wizard.desktop -- "$@"
# End automatically added section


true "INFO: Done with debhelper."

true "
#####################################################################
## INFO: END  : $DPKG_MAINTSCRIPT_PACKAGE $DPKG_MAINTSCRIPT_NAME $@
#####################################################################
"

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