From c9186c8722abbdf83a90e1f1fe92ce2884d0275e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Wed, 1 Nov 2017 15:11:51 +0000 Subject: [PATCH] Move vault to veracrypt (#148) * Move vault to veracrypt * Remove broken switch (windows does not support) --- common/configure_fresh_system.sh | 2 ++ tools/mount-vault | 7 +++++-- tools/umount-vault | 8 +++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/common/configure_fresh_system.sh b/common/configure_fresh_system.sh index 87057714..14a8549a 100755 --- a/common/configure_fresh_system.sh +++ b/common/configure_fresh_system.sh @@ -206,8 +206,10 @@ if [[ -z $NOPYTHON3 ]]; then PIP=pip fi echo "Upgrading pip" + set +e $SUDO $PIP install --upgrade pip setuptools $SUDO $PIP install --upgrade packaging + set -e echo "Installing Nikola" $SUDO $PIP install --upgrade pygments-style-solarized ws4py watchdog webassets Nikola fi diff --git a/tools/mount-vault b/tools/mount-vault index 00603a75..e5a7bc45 100755 --- a/tools/mount-vault +++ b/tools/mount-vault @@ -2,6 +2,9 @@ set -e mkdir -p ~/.vault -sudo cryptsetup luksOpen ~/vaults/vault.img vault -sudo mount /dev/mapper/vault ~/.vault +VERACRYPT="veracrypt" +if [[ "$OSTYPE" == "darwin"* ]]; then + VERACRYPT="/Applications/VeraCrypt.app/Contents/MacOS/VeraCrypt" +fi +$VERACRYPT -t --mount ~/vaults/vault.vera ~/.vault sudo chown $USER ~/.vault diff --git a/tools/umount-vault b/tools/umount-vault index fb71d594..dff9aedb 100755 --- a/tools/umount-vault +++ b/tools/umount-vault @@ -1,6 +1,8 @@ #!/bin/bash set -e -sudo umount ~/.vault -sudo cryptsetup luksClose vault - +VERACRYPT="veracrypt" +if [[ "$OSTYPE" == "darwin"* ]]; then + VERACRYPT="/Applications/VeraCrypt.app/Contents/MacOS/VeraCrypt" +fi +$VERACRYPT -t -d