From 4be03cbf5cc848858483037aaf3da1259d26019e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Fri, 7 Oct 2016 22:46:23 +0200 Subject: [PATCH] Add basic scripts to operate on ecrypted vaults --- fedora/configure_fresh_system | 2 +- tools/mount-vault | 9 +++++++++ tools/umount-vault | 8 ++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100755 tools/mount-vault create mode 100755 tools/umount-vault diff --git a/fedora/configure_fresh_system b/fedora/configure_fresh_system index bd1701d6..5f051198 100755 --- a/fedora/configure_fresh_system +++ b/fedora/configure_fresh_system @@ -5,7 +5,7 @@ set -e if [[ -z $NOUPGRADE ]]; then sudo dnf -y upgrade --best --allowerasing fi -sudo dnf -y --best --allowerasing install tmux atop zsh thunderbird thunderbird-enigmail thunderbird-lightning firefox aria2 gajim lm_sensors freecad python3-pip qt5-qtbase-devel qt5-qtwebkit-devel meld whois curl pv nodejs terminator gsmartcontrol python-pip mercurial python3-devel libxslt-devel libjpeg-turbo-devel conky conky-manager redshift redshift-gtk cmake gtk2-devel intltool gparted wine solaar glances the_silver_searcher dkms kernel-devel gimp transmission-gtk git xz util-linux-user powertop dnf-automatic kdiff3 yum-utils util-linux-user ncurses-devel zeal +sudo dnf -y --best --allowerasing install tmux atop zsh thunderbird thunderbird-enigmail thunderbird-lightning firefox aria2 gajim lm_sensors freecad python3-pip qt5-qtbase-devel qt5-qtwebkit-devel meld whois curl pv nodejs terminator gsmartcontrol python-pip mercurial python3-devel libxslt-devel libjpeg-turbo-devel conky conky-manager redshift redshift-gtk cmake gtk2-devel intltool gparted wine solaar glances the_silver_searcher dkms kernel-devel gimp transmission-gtk git xz util-linux-user powertop dnf-automatic kdiff3 yum-utils util-linux-user ncurses-devel zeal archivemount FEDORA_VERSION=`rpm -E %fedora` sudo dnf -y install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$FEDORA_VERSION.noarch.rpm sudo dnf -y install http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$FEDORA_VERSION.noarch.rpm diff --git a/tools/mount-vault b/tools/mount-vault new file mode 100755 index 00000000..3c071b22 --- /dev/null +++ b/tools/mount-vault @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e +echo "decrypting..." +gpg2 -d ~/Nextcloud/vault.tar.xz.gpg > ~/.vault.tar.xz +echo "mounting..." +mkdir -p ~/.vault +archivemount ~/.vault.tar.xz ~/.vault + diff --git a/tools/umount-vault b/tools/umount-vault new file mode 100755 index 00000000..fdf83744 --- /dev/null +++ b/tools/umount-vault @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e +umount ~/.vault +gpg2 -c ~/.vault.tar.xz +mv ~/.vault.tar.xz.gpg ~/Nextcloud/vault.tar.xz.gpg +rm -vfr ~/.vault* +