qubes-linux-template-builder/scripts_debian/wheezy+whonix-workstation/99_custom_configuration.sh

31 lines
1.3 KiB
Bash
Raw Normal View History

#!/bin/bash
# vim: set ts=4 sw=4 sts=4 et :
# ------------------------------------------------------------------------------
2014-10-25 22:06:30 +00:00
# Source external scripts
# ------------------------------------------------------------------------------
2014-10-28 08:09:55 +00:00
. ${SCRIPTSDIR}/vars.sh
. ./umount_kill.sh >/dev/null
2014-10-25 22:06:30 +00:00
# ------------------------------------------------------------------------------
# Configurations
# ------------------------------------------------------------------------------
2014-10-28 08:09:55 +00:00
if [ "${VERBOSE}" -ge 2 -o "${DEBUG}" == "1" ]; then
set -x
2014-10-25 22:06:30 +00:00
else
set -e
fi
# ------------------------------------------------------------------------------
# whonix-netvm-gateway contains last known IP used to search and replace
# ------------------------------------------------------------------------------
2014-10-28 08:09:55 +00:00
if [ -f "${INSTALLDIR}/tmp/.whonix_prepared" -a ! -f "${INSTALLDIR}/tmp/.whonix_custom_configurations" ]; then
2014-10-25 22:06:30 +00:00
# --------------------------------------------------------------------------
# Install Custom Configurations
# --------------------------------------------------------------------------
2014-10-28 08:09:55 +00:00
echo "10.152.152.11" > "${INSTALLDIR}/etc/whonix-ip"
echo "10.152.152.10" > "${INSTALLDIR}/etc/whonix-netvm-gateway"
2014-10-25 22:06:30 +00:00
2014-10-28 08:09:55 +00:00
touch "${INSTALLDIR}/tmp/.whonix_custom_configurations"
fi