Skip to content

Commit

Permalink
override with config in storage root if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
bilogic committed Apr 21, 2024
1 parent 22322f5 commit 705a756
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion setup/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ if [ -f /etc/mailinabox.conf ]; then
cat /etc/mailinabox.conf | sed s/^/DEFAULT_/ >/tmp/mailinabox.prev.conf
source /tmp/mailinabox.prev.conf
rm -f /tmp/mailinabox.prev.conf

# Since this is a second run, attempt to read overridden settings from $STORAGE_ROOT/mailinabox.conf
if [ -f $STORAGE_ROOT/mailinabox.conf ]; then
cat $STORAGE_ROOT/mailinabox.conf | sed s/^/DEFAULT_/ >/tmp/mailinabox.prev.conf
source /tmp/mailinabox.prev.conf
rm -f /tmp/mailinabox.prev.conf
fi
else
FIRST_TIME_SETUP=1
fi
Expand Down Expand Up @@ -95,7 +102,7 @@ fi
# tools know where to look for data. The default MTA_STS_MODE setting
# is blank unless set by an environment variable, but see web.sh for
# how that is interpreted.
cat >/etc/mailinabox.conf <<EOF
cat <<EOF >/etc/mailinabox.conf
STORAGE_USER=$STORAGE_USER
STORAGE_ROOT=$STORAGE_ROOT
PRIMARY_HOSTNAME=$PRIMARY_HOSTNAME
Expand Down

0 comments on commit 705a756

Please sign in to comment.