mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-12 01:37:07 +00:00
automatically install avahi for systems with a .local tld
This commit is contained in:
parent
026115b845
commit
9ea03e18c9
@ -92,6 +92,15 @@ init_test_system() {
|
|||||||
wait_for_apt
|
wait_for_apt
|
||||||
apt-get upgrade -qq || die "apt-get upgrade failed!"
|
apt-get upgrade -qq || die "apt-get upgrade failed!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# install avahi if the system dns domain is .local - note that
|
||||||
|
# /bin/dnsdomainname returns empty string at this point
|
||||||
|
case "$PRIMARY_HOSTNAME" in
|
||||||
|
*.local )
|
||||||
|
wait_for_apt
|
||||||
|
apt-get install -y -qq avahi-daemon || die "could not install avahi"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -234,6 +243,11 @@ miab_ldap_install() {
|
|||||||
|
|
||||||
# set actual STORAGE_ROOT, STORAGE_USER, PRIVATE_IP, etc
|
# set actual STORAGE_ROOT, STORAGE_USER, PRIVATE_IP, etc
|
||||||
. /etc/mailinabox.conf || die "Could not source /etc/mailinabox.conf"
|
. /etc/mailinabox.conf || die "Could not source /etc/mailinabox.conf"
|
||||||
|
|
||||||
|
# setup changes the hostname so avahi must be restarted
|
||||||
|
if systemctl is-active --quiet avahi-daemon; then
|
||||||
|
systemctl restart avahi-daemon
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user