author | Alberto Bertogli
<albertito@blitiri.com.ar> 2021-02-22 23:41:06 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2021-02-23 00:21:55 UTC |
parent | e7a5a4875c1bc6fdc9f8362a737939172dcdea3f |
docker/entrypoint.sh | +4 | -3 |
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index a14f578..3bb9e9f 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -95,9 +95,10 @@ done >> /etc/dovecot/auto-ssl.conf # Pick the default domain as default hostname for chasquid. This is only used # in plain text sessions and on very rare cases, and it's mostly for aesthetic # purposes. -if ! grep -iq "hostname:" /etc/chasquid/chasquid.conf; then - echo "hostname: '$ONE_DOMAIN'" >> /etc/chasquid/chasquid.conf -fi +# Since the list of domains could have changed since the last run, always +# remove and re-add the setting for consistency. +sed -i '/^hostname:/d' /etc/chasquid/chasquid.conf +echo "hostname: '$ONE_DOMAIN'" >> /etc/chasquid/chasquid.conf # Start the services: dovecot in background, chasquid in foreground. start-stop-daemon --start --quiet --pidfile /run/dovecot.pid \