Fix detection of ald backup root config when no server-config available
This commit is contained in:
parent
dca81553b6
commit
22f454657d
|
@ -98,7 +98,11 @@ if [[ $MODE == "install" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Installing backup directory..."
|
echo "Installing backup directory..."
|
||||||
BKP_DIR="$(grep -o '^BACKUP_ROOT=".*"$' /etc/rs-backup/server-config | sed 's#BACKUP_ROOT=\"\(.*\)\"$#\1#')"
|
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 [[ "$DISTRIBUTION" == "Synology" ]] && [[ "$BKP_DIR" == "/bkp" ]]; then
|
||||||
if readlink -q /var/services/homes > /dev/null; then
|
if readlink -q /var/services/homes > /dev/null; then
|
||||||
BKP_DIR="/var/services/homes"
|
BKP_DIR="/var/services/homes"
|
||||||
|
@ -107,6 +111,7 @@ if [[ $MODE == "install" ]]; then
|
||||||
BKP_DIR="/volume1/homes"
|
BKP_DIR="/volume1/homes"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Backup directory path will be '$BKP_DIR'."
|
echo "Backup directory path will be '$BKP_DIR'."
|
||||||
echo -n "Do you want to use this directory? [Y/n] "
|
echo -n "Do you want to use this directory? [Y/n] "
|
||||||
read answer
|
read answer
|
||||||
|
|
Loading…
Reference in New Issue