From ec1d7ba3846bc1e587ee39bf8556689b7cfaf3db Mon Sep 17 00:00:00 2001 From: KiekerJan Date: Sun, 24 Apr 2022 16:10:28 +0200 Subject: [PATCH] include configuration of BACKUP_ROOT --- setup/questions.sh | 5 +++++ setup/start.sh | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/setup/questions.sh b/setup/questions.sh index 2479f8ab..d1e12eb4 100644 --- a/setup/questions.sh +++ b/setup/questions.sh @@ -211,6 +211,11 @@ if [ -z "${STORAGE_ROOT:-}" ]; then STORAGE_ROOT=$([[ -z "${DEFAULT_STORAGE_ROOT:-}" ]] && echo "/home/$STORAGE_USER" || echo "$DEFAULT_STORAGE_ROOT") fi +# Set BACKUP_ROOT to default (empty) value, unless we've already got it from a previous run. +if [ -z "${BACKUP_ROOT:-}" ]; then + BACKUP_ROOT="" +fi + # Show the configuration, since the user may have not entered it manually. echo echo "Primary Hostname: $PRIMARY_HOSTNAME" diff --git a/setup/start.sh b/setup/start.sh index 601b0f1d..76cab31f 100755 --- a/setup/start.sh +++ b/setup/start.sh @@ -58,8 +58,8 @@ chmod +x /usr/local/bin/mailinabox # Ask the user for the PRIMARY_HOSTNAME, PUBLIC_IP, and PUBLIC_IPV6, # if values have not already been set in environment variables. When running -# non-interactively, be sure to set values for all! Also sets STORAGE_USER and -# STORAGE_ROOT. +# non-interactively, be sure to set values for all! Also sets STORAGE_USER, +# STORAGE_ROOT and BACKUP_ROOT. source setup/questions.sh # Run some network checks to make sure setup on this machine makes sense. @@ -94,6 +94,7 @@ fi cat > /etc/mailinabox.conf << EOF; STORAGE_USER=$STORAGE_USER STORAGE_ROOT=$STORAGE_ROOT +BACKUP_ROOT=$BACKUP_ROOT PRIMARY_HOSTNAME=$PRIMARY_HOSTNAME PUBLIC_IP=$PUBLIC_IP PUBLIC_IPV6=$PUBLIC_IPV6