From ae78d9d243f25b4723fd12f143e34c0f3fe694de Mon Sep 17 00:00:00 2001 From: tb14 Date: Thu, 5 Dec 2019 15:59:37 -0800 Subject: [PATCH] veracrypt install fix. System support for Ubuntu 19.10 --- AmRRON-Setup-Script.sh | 79 +++++++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/AmRRON-Setup-Script.sh b/AmRRON-Setup-Script.sh index 3bef08f..1d0de2e 100755 --- a/AmRRON-Setup-Script.sh +++ b/AmRRON-Setup-Script.sh @@ -1,7 +1,7 @@ #!/bin/bash ################################################################################ ################################################################################ -######################## AmRRON Setup Script v0.5.9.3 ######################## +######################## AmRRON Setup Script v0.5.9.4 ######################## ######################## Created by TB-14 ######################## ######################## 05 DEC 2019 ######################## ################################################################################ @@ -405,8 +405,7 @@ fi echo "90% Complete" -NEWVC=$(curl -s https://www.veracrypt.fr/en/Downloads.html | grep "For FreeBSD,\ - Linux and MacOSX:" | awk -F ": " '{print $2}' | head -c 4) +NEWVC=$(curl -s https://www.veracrypt.fr/en/Downloads.html | sed -n 's/

Latest\ Stable\ Release\ -\ //p' | awk -F '(' '{print $1}' | sed 's/.$//') if [[ $NEWVC == "" ]]; then NEWVC="SERVER DOWN" fi @@ -494,8 +493,8 @@ tested.\n\nThis installer has been tested on Raspbian Stretch, Ubuntu \ | awk '{print $1}') VER=$(grep "VERSION_ID" /etc/os-release | awk -F "=" '{print $2}' | tr -d '"') declare -A VER_MAP=(["10"]="buster" ["9"]="stretch" ["8"]="jessie" ["16.04"]="xenial" \ - ["14.04"]="trusty" ["18.04"]="bionic" ["18.10"]="cosmic" ["19.04"]="disco" ["19.10"]="eoan" ["18"]="sara" ["18.1"]="serena" \ - ["18.2"]="sonya" ["18.3"]="sylvia" ["19"]="tara" ["19.1"]="tessa" ["19.2"]="tina" ) + ["14.04"]="trusty" ["18.04"]="bionic" ["18.10"]="cosmic" ["19.04"]="disco" ["19.10"]="eoan" ["20.04"]="focal" ["18"]="sara" ["18.1"]="serena" \ + ["18.2"]="sonya" ["18.3"]="sylvia" ["19"]="tara" ["19.1"]="tessa" ["19.2"]="tina" ["19.3"]="tricia" ) OSCN=${VER_MAP["${VER}"]} fi @@ -503,7 +502,7 @@ tested.\n\nThis installer has been tested on Raspbian Stretch, Ubuntu \ case ${PLAT} in Ubuntu|Raspbian|Debian|LinuxMint) case ${OSCN} in - trusty|xenial|bionic|cosmic|disco|eoan|jessie|stretch|buster|sara|serena|sonya|sylvia|tara|tessa|tina) + trusty|xenial|bionic|cosmic|disco|eoan|focal|jessie|stretch|buster|sara|serena|sonya|sylvia|tara|tessa|tina|tricia) ;; *) maybeOS_Support @@ -1236,7 +1235,7 @@ fi else - if [[ $OSCN =~ (tara|tessa|tina|bionic|cosmic|stretch|buster) ]]; then + if [[ $OSCN =~ (tara|tessa|tina|tricia|bionic|eoan|focal|cosmic|stretch|buster) ]]; then echo "Getting dependencies" sudo apt-get -y install libqt5multimedia5-plugins libqt5serialport5 libqt5printsupport5 \ @@ -1320,7 +1319,7 @@ function js8call_install() { if [[ ${PLAT} = "Raspbian" ]]; then js8call_link=$(curl -s http://files.js8call.com/latest.html | grep -o "http://files.js8call.com/[0-9].[0-9].[0-9]/js8call_[0-9].[0-9].[0-9]_armhf.deb" | head -n 1) elif [[ $(uname -m) = x86_64 ]]; then - if [[ $OSCN =~ (tara|tessa|tina|bionic|cosmic|disco|eoan) ]]; then + if [[ $OSCN =~ (tara|tessa|tina|tricia|bionic|cosmic|disco|eoan|focal) ]]; then js8call_link=$(curl -s http://files.js8call.com/latest.html | grep -o "http://files.js8call.com/[0-9].[0-9].[0-9]/js8call_[0-9].[0-9].[0-9]_18.04_amd64.deb" | head -n 1) elif [[ $OSCN =~ (sara|serena|sonya|sylvia|trusty|xenial) ]]; then js8call_link=$(curl -s http://files.js8call.com/latest.html | grep -o "http://files.js8call.com/[0-9].[0-9].[0-9]/js8call_[0-9].[0-9].[0-9]_16.04_amd64.deb" | head -n 1) @@ -1956,7 +1955,7 @@ fi echo "Electrum is already at the Version $NEWELECTRUM" else - if [[ $OSCN =~ (tara|tessa|tina|bionic|cosmic|disco|eoan|buster) ]]; then + if [[ $OSCN =~ (tara|tessa|tina|tricia|bionic|cosmic|disco|eoan|focal|buster) ]]; then echo "Getting dependencies" sudo apt-get install -y python3-setuptools python3-pyqt5 python3-pip || { ERRCODE="Failed to get dependencies for Electrum"; errors; return; } @@ -2421,40 +2420,48 @@ if [[ $NEWVC == "SERVER DOWN" ]]; then echo "Veracrypt server unresponsive or broken link." >> /tmp/failures return fi - VCFILE=$"veracrypt-${NEWVC}-setup" +NEWVC_lower=$(echo $NEWVC | tr '[:upper:]' '[:lower:]') if [[ ${PLAT} = "Raspbian" ]]; then - NEWVC=$"1.21" - VCFILE=$"veracrypt-${NEWVC}-raspbian-setup" - VCSYS=$"armv7" + + VCLINK=$"http://sourceforge.net/projects/veracrypt/files/Contributions/ARM%20Linux/veracrypt-1.0f-1-setup-arm.tar.bz2" + + elif [[ $OSCN =~ (eoan|focal) ]]; then + VCLINK=$"https://launchpad.net/veracrypt/trunk/${NEWVC_lower}/+download/veracrypt-${NEWVC}-Ubuntu-19.10-amd64.deb" + + elif [[ $OSCN =~ (disco) ]]; then + VCLINK=$"https://launchpad.net/veracrypt/trunk/${NEWVC_lower}/+download/veracrypt-${NEWVC}-Ubuntu-19.04-amd64.deb" + + elif [[ $OSCN =~ (bionic|cosmic|tara|tessa|tina|tricia) ]]; then + VCLINK=$"https://launchpad.net/veracrypt/trunk/${NEWVC_lower}/+download/veracrypt-${NEWVC}-Ubuntu-18.04-amd64.deb" + + elif [[ $OSCN =~ (xenial|yakkety|zesty|artful|sarah|serena|sonya|sylvia) ]]; then + VCLINK=$"https://launchpad.net/veracrypt/trunk/${NEWVC_lower}/+download/veracrypt-${NEWVC}-Ubuntu-16.04-amd64.deb" + + - elif [[ $(uname -m) = x86_64 ]]; then - VCSYS=$"x64" - else - VCSYS=$"x86" fi - cd $SECDIR && wget -N https://launchpad.net/veracrypt/trunk/$NEWVC/\ -+download/${VCFILE}.tar.bz2 || + VCFILE=$(echo $VCLINK | awk -F '/' '{print $9}') + + + cd $SECDIR && wget -N ${VCLINK} || { ERRCODE="Failed to download Veracrypt"; errors; return; } - tar xvf $VCFILE.tar.bz2 && rm $VCFILE.tar.bz2 || + if [[ ${PLAT} = "Raspbian" ]]; then + + tar xvf $VCFILE && rm $VCFILE || { ERRCODE="Failed to extract Veracrypt"; errors; return; } - rm veracrypt-$NEWVC-setup-console-* || + rm *-console-arm || { ERRCODE="Failed to remove extra CLI setup files for Veracrypt"; errors; return; } - if [[ ${PLAT} = "Raspbian" ]]; then - echo vc >> /tmp/cleanup - elif [[ $(uname -m) = x86_64 ]]; then - rm $VCFILE-gui-x86 || - { ERRCODE="Failed to remove extra x86 setup files for Veracrypt"; errors; return; } - echo vc >> /tmp/cleanup - else - rm $VCFILE-gui-x64 - { ERRCODE="Failed to remove extra x64 setup files for Veracrypt"; errors; return; } - echo vc >> /tmp/cleanup - fi + echo vc >> /tmp/cleanup + + else + sudo dpkg -i ${VCFILE} || + { ERRCODE="Failed to install Veracrypt"; errors; return; } + fi } @@ -2853,7 +2860,7 @@ yad --image=$DIR/images/corps-icon.png --center --checklist --print-column=2 --s false "PFE" "Paranoia Tools File Encrypter. Encrypt/Decrypt messages and perform Steganography" "${PTEVER}" \ false "GTKHASH" "GTK based file hash tool" "${GTKHASHVER}" \ false "GPA" "GNU Privacy Assist Key Manager" "${GPAVER}" \ - false "VERACRYPT" "Disk/File Encryption. $NEWVC available for Linux. 1.21 available for Raspberry Pi at this time." "" \ + false "VERACRYPT" "Disk/File Encryption. $NEWVC available for Linux. 1.0f-1 available for Raspberry Pi." "" \ false "BITMESSAGE" "Bitmessage secure decentralized email" "" \ false "HARDEN_SSH" "Change folder permissions and provide SSH tips document." "" \ false "WIFI-DISABLE" "Disable WiFi -- Raspberry Pi 3 ONLY" "" \ @@ -3563,14 +3570,14 @@ cleanupyad if [[ ${PLAT} = "Raspbian" ]]; then TITLE="Veracrypt Raspbian" -TEXT="Version 1.21 has been downloaded. +TEXT="Version 1.0f-1 has been downloaded. Veracrypt has not released an ARM compatible version since 1.21. You will have to complete installation once this installer exits. -You can do this by navigating to the $SECDIR and executing \ -veracrypt-$NEWVC-setup-gui-$VCSYS." +You can do this by navigating to $SECDIR and executing \ +${VCFILE}." cleanupyad else