2014-10-14 16:02:12 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# vim: set ts=4 sw=4 sts=4 et :
|
|
|
|
|
|
|
|
#
|
|
|
|
# Whonix Post Install Steps (after qubes install)
|
|
|
|
#
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
2014-10-16 16:03:05 +00:00
|
|
|
# Source external scripts
|
2014-10-14 16:02:12 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
2014-10-28 08:09:55 +00:00
|
|
|
. ${SCRIPTSDIR}/vars.sh
|
2014-10-14 16:02:12 +00:00
|
|
|
|
2014-10-16 16:03:05 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Configurations
|
|
|
|
# ------------------------------------------------------------------------------
|
2014-10-28 08:09:55 +00:00
|
|
|
if [ "${VERBOSE}" -ge 2 -o "${DEBUG}" == "1" ]; then
|
2014-10-14 16:02:12 +00:00
|
|
|
set -x
|
2014-10-16 16:03:05 +00:00
|
|
|
else
|
|
|
|
set -e
|
2014-10-14 16:02:12 +00:00
|
|
|
fi
|
|
|
|
|
2014-11-07 05:34:38 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Enable Qubes-Whonix services
|
|
|
|
# ------------------------------------------------------------------------------
|
2014-11-09 17:53:07 +00:00
|
|
|
chroot "${INSTALLDIR}" systemctl disable qubes-whonix-network.service || :
|
2014-11-07 05:34:38 +00:00
|
|
|
chroot "${INSTALLDIR}" systemctl enable qubes-whonix-network.service || :
|
2014-11-09 17:53:07 +00:00
|
|
|
|
|
|
|
chroot "${INSTALLDIR}" systemctl disable qubes-whonix-firewall.service || :
|
|
|
|
chroot "${INSTALLDIR}" systemctl enable qubes-whonix-firewall.service || :
|
|
|
|
|
|
|
|
chroot "${INSTALLDIR}" systemctl enable qubes-whonix-init.service || :
|
2014-11-07 05:34:38 +00:00
|
|
|
|
2014-10-14 16:02:12 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Restore Whonix apt-get
|
|
|
|
# ------------------------------------------------------------------------------
|
2014-10-28 08:09:55 +00:00
|
|
|
pushd "${INSTALLDIR}/usr/bin"
|
|
|
|
{
|
|
|
|
rm -f apt-get;
|
|
|
|
cp -p apt-get.anondist apt-get;
|
|
|
|
}
|
|
|
|
popd
|
2014-10-14 16:02:12 +00:00
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Restore whonix resolv.conf
|
|
|
|
# ------------------------------------------------------------------------------
|
2014-10-28 08:09:55 +00:00
|
|
|
pushd "${INSTALLDIR}/etc"
|
2014-10-26 18:46:20 +00:00
|
|
|
{
|
2014-10-28 08:09:55 +00:00
|
|
|
rm -f resolv.conf;
|
|
|
|
cp -p resolv.conf.anondist resolv.conf;
|
2014-10-26 18:46:20 +00:00
|
|
|
}
|
|
|
|
popd
|
2014-10-14 16:02:12 +00:00
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Cleanup Whonix Installation
|
|
|
|
# ------------------------------------------------------------------------------
|
2014-10-28 08:09:55 +00:00
|
|
|
rm -rf "${INSTALLDIR}"/home/user/Whonix
|
|
|
|
rm -rf "${INSTALLDIR}"/home/user/whonix_binary
|
|
|
|
rm -f "${INSTALLDIR}"/home/user/whonix_fix
|
2014-11-02 21:14:36 +00:00
|
|
|
rm -f "${INSTALLDIR}"/home/user/whonix_build.sh
|