#!/bin/bash

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

set -x

true "$0: START"

/usr/libexec/anon-gw-anonymizer-config/make-sure-torrc-exist
/usr/libexec/helper-scripts/repair-torrc

if ! test -f /usr/share/qubes/marker-vm ; then
   ## Do none of the following if not running inside Qubes.
   exit 0
fi

if test -f /run/qubes/this-is-templatevm ; then
   ## Do none of the following in a TemplateVM.
   exit 0
fi

## XXX: duplicated in qubes-whonix-postinit.service
## Replace IP addresses in known configuration files / scripts with
## currently discovered IP address.
/usr/lib/qubes-whonix/replace-ips

true "$0: END"
