Implemented error if base can't be loaded

This commit is contained in:
Kevin Veen-Birkenbach 2020-05-02 12:30:21 +02:00
parent d7cb45aae9
commit f385bc3d98
9 changed files with 10 additions and 10 deletions

View File

@ -37,10 +37,10 @@ declare -a BACKUP_LIST=("$HOME/.ssh/" \
echo
echo "${COLOR_YELLOW}The"
base64 -d <<<"ICBfX19fXyAgICAgICAgICAgICAgICBfX19fXyAgICAgICAgICAgXyAgICAgICAgICAgICAgICAgCiAvIF9fX198ICAgICAgICAgICAgICAvIF9fX198ICAgICAgICAgfCB8ICAgICAgICAgICAgICAgIAp8IHwgICAgIF9fXyAgXyBfXyBfX198IChfX18gIF8gICBfIF9fX3wgfF8gX19fIF8gX18gX19fICAKfCB8ICAgIC8gXyBcfCAnX18vIF8gXFxfX18gXHwgfCB8IC8gX198IF9fLyBfIFwgJ18gYCBfIFwgCnwgfF9fX3wgKF8pIHwgfCB8ICBfXy9fX19fKSB8IHxffCBcX18gXCB8fCAgX18vIHwgfCB8IHwgfAogXF9fX19fXF9fXy98X3wgIFxfX198X19fX18vIFxfXywgfF9fXy9cX19cX19ffF98IHxffCB8X3wKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX18vIHwgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfF9fXy8gICAgICAgICAgICAgICAgICAgICAgIAo="
echo "is administration tool designed from and for Kevin Veen-Birkenbach."
echo "is an administration tool designed from and for Kevin Veen-Birkenbach."
echo
echo "Licensed under GNU GENERAL PUBLIC LICENSE Version 3"
echo "${COLOR_RESET}"
}
HEADER

View File

@ -4,7 +4,7 @@
# @author Kevin Veen-Birkenbach [aka. Frantz]
#
# shellcheck source=/dev/null # Deactivate SC1090
source "$(dirname "$(readlink -f "${0}")")/base.sh"
source "$(dirname "$(readlink -f "${0}")")/base.sh" || echo "Loading base.sh failed." && exit 1
SYSTEM_MEMORY_KB="$(grep MemTotal /proc/meminfo | awk '{print $2}')"
echo "Start setup of customized core software..."
echo "Copying templates to home folder..."

View File

@ -1,6 +1,6 @@
#!/bin/bash
# Executes all scripts which are necessary to backup data
# @author Kevin Veen-Birkenbach [aka. Frantz]
source "$(dirname "$(readlink -f "${0}")")/base.sh"
source "$(dirname "$(readlink -f "${0}")")/base.sh" || echo "Loading base.sh failed." && exit 1
bash "$SCRIPT_PATH/import-data-from-system.sh"
bash "$SCRIPT_PATH/push-local-repositories.sh"

View File

@ -2,5 +2,5 @@
# Executes the import script in reverse mode
# @author Kevin Veen-Birkenbach [aka. Frantz]
# shellcheck source=/dev/null # Deactivate SC1090
source "$(dirname "$(readlink -f "${0}")")/base.sh"
source "$(dirname "$(readlink -f "${0}")")/base.sh" || echo "Loading base.sh failed." && exit 1
bash "$SCRIPT_PATH/import-data-from-system.sh" reverse

View File

@ -6,7 +6,7 @@
#
# shellcheck source=/dev/null # Deactivate SC1090
# shellcheck disable=SC2143 # Comparing with -z allowed
source "$(dirname "$(readlink -f "${0}")")/base.sh"
source "$(dirname "$(readlink -f "${0}")")/base.sh" || echo "Loading base.sh failed." && exit 1
if [ -z "$(mount | grep "$DECRYPTED_PATH")" ]
then
echo "The decrypted folder $DECRYPTED_PATH is locked. You need to unlock it!"

View File

@ -4,6 +4,6 @@
# @author Kevin Veen-Birkenbach [aka. Frantz]
#
# shellcheck source=/dev/null # Deactivate SC1090
source "$(dirname "$(readlink -f "${0}")")/base.sh"
source "$(dirname "$(readlink -f "${0}")")/base.sh" || echo "Loading base.sh failed." && exit 1
echo "Locking directory $DECRYPTED_PATH..."
fusermount -u "$DECRYPTED_PATH" && echo "Data is now encrypted." && echo "Removing directory $DECRYPTED_PATH..." && rmdir "$DECRYPTED_PATH"

View File

@ -4,7 +4,7 @@
# @author Kevin Veen-Birkenbach [aka. Frantz]
#
# shellcheck source=/dev/null # Deactivate SC1090
source "$(dirname "$(readlink -f "${0}")")/base.sh"
source "$(dirname "$(readlink -f "${0}")")/base.sh" || echo "Loading base.sh failed." && exit 1
echo "Unlocking directory $DECRYPTED_PATH..."
if [ ! -d "$DECRYPTED_PATH" ]
then

View File

@ -2,5 +2,5 @@
#
# Pushs all repositories
# @author Kevin Veen-Birkenbach [aka. Frantz]
source "$(dirname "$(readlink -f "${0}")")/base.sh"
source "$(dirname "$(readlink -f "${0}")")/base.sh" || echo "Loading base.sh failed." && exit 1
bash "$SCRIPT_PATH/push-local-repositories.sh" push

View File

@ -3,7 +3,7 @@
# Pushs all repositories
# @param $1 git command which should be executed instead of default pull
# @author Kevin Veen-Birkenbach [aka. Frantz]
source "$(dirname "$(readlink -f "${0}")")/base.sh"
source "$(dirname "$(readlink -f "${0}")")/base.sh" || echo "Loading base.sh failed." && exit 1
if [ $# -eq 1 ]
then
git_command=$1