diff --git a/system_setup/mount_ecrypt_home.sh b/system_setup/mount_ecrypt_home.sh index af2ff60..d73a8eb 100755 --- a/system_setup/mount_ecrypt_home.sh +++ b/system_setup/mount_ecrypt_home.sh @@ -80,13 +80,14 @@ else fi fi if [ "${ENCKEY}." == "." ]; then - echo "Some Error while fetching your Credentials. This should not happen. Quit." + echo "Some Error while fetching your IPA Vault Key. This should not happen. Quit." rm /var/tmp/IPAVAULTKEY.txt exit 2 fi +echo "Sucessfuly obtained IPA vault fileencryption key." #Setup and use encrypted filesystem -if [ ! -d "${DECRYPTEDDATADIR}" ]; then +if [ ! -d "${DECRYPTEDDATADIR}" ] || [ -f "${HOME}/.config/gocryptfs/gocryptfs.conf" ]; then #Key has been obtained, but no Directory was created till know echo "First Setup of encryption: Creating new Directories now" mkdir -p ${ENCRYPTEDDATADIR} ${DECRYPTEDDATADIR} ${HOME}/.config/gocryptfs @@ -100,6 +101,6 @@ if [ ${RETVAL} -eq 0 ]; then echo "Sucessfully mounted encrypted private Directory ${DECRYPTEDDATADIR}" exit 0 else - echo "Errorcode ${RETAVAL}" + echo "Errorcode ${RETVAL}" exit 1 fi