Add basic scripts to operate on ecrypted vaults

This commit is contained in:
Cyryl Płotnicki 2016-10-07 22:46:23 +02:00
parent 3ac7f9b8df
commit 4be03cbf5c
3 changed files with 18 additions and 1 deletions

View file

@ -5,7 +5,7 @@ set -e
if [[ -z $NOUPGRADE ]]; then if [[ -z $NOUPGRADE ]]; then
sudo dnf -y upgrade --best --allowerasing sudo dnf -y upgrade --best --allowerasing
fi 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` 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/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 sudo dnf -y install http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$FEDORA_VERSION.noarch.rpm

9
tools/mount-vault Executable file
View file

@ -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

8
tools/umount-vault Executable file
View file

@ -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*