Fix detection of ald backup root config when no server-config available

This commit is contained in:
Janek Bevendorff 2014-10-05 16:07:16 +02:00
parent dca81553b6
commit 22f454657d
1 changed files with 6 additions and 1 deletions

View File

@ -98,7 +98,11 @@ if [[ $MODE == "install" ]]; then
fi
echo "Installing backup directory..."
if [ -e /etc/rs-backup/server-config ]; then
BKP_DIR="$(grep -o '^BACKUP_ROOT=".*"$' /etc/rs-backup/server-config | sed 's#BACKUP_ROOT=\"\(.*\)\"$#\1#')"
else
BKP_DIR="/bkp"
fi
if [[ "$DISTRIBUTION" == "Synology" ]] && [[ "$BKP_DIR" == "/bkp" ]]; then
if readlink -q /var/services/homes > /dev/null; then
BKP_DIR="/var/services/homes"
@ -107,6 +111,7 @@ if [[ $MODE == "install" ]]; then
BKP_DIR="/volume1/homes"
fi
fi
echo "Backup directory path will be '$BKP_DIR'."
echo -n "Do you want to use this directory? [Y/n] "
read answer