include configuration of BACKUP_ROOT

This commit is contained in:
KiekerJan 2022-04-24 16:10:28 +02:00
parent c1b7a9d4d2
commit ec1d7ba384
2 changed files with 8 additions and 2 deletions

View File

@ -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"

View File

@ -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