diff --git a/hooks/conf_regen/12-metronome b/hooks/conf_regen/12-metronome index e0797e673..220d18d58 100755 --- a/hooks/conf_regen/12-metronome +++ b/hooks/conf_regen/12-metronome @@ -49,12 +49,8 @@ do_post_regen() { # retrieve variables main_domain=$(cat /etc/yunohost/current_host) - # FIXME : small optimization to do to avoid calling a yunohost command ... - # maybe another env variable like YNH_MAIN_DOMAINS idk - domain_list=$(yunohost domain list --exclude-subdomains --output-as plain --quiet) - # create metronome directories for domains - for domain in $domain_list; do + for domain in $YNH_MAIN_DOMAINS; do mkdir -p "/var/lib/metronome/${domain//./%2e}/pep" # http_upload directory must be writable by metronome and readable by nginx mkdir -p "/var/xmpp-upload/${domain}/upload" diff --git a/src/regenconf.py b/src/regenconf.py index 5922e6832..c763fb6b6 100644 --- a/src/regenconf.py +++ b/src/regenconf.py @@ -140,6 +140,7 @@ def regen_conf( # though kinda tight-coupled to the postinstall logic :s if os.path.exists("/etc/yunohost/installed"): env["YNH_DOMAINS"] = " ".join(domain_list()["domains"]) + env["YNH_MAIN_DOMAINS"] = " ".join(domain_list(exclude_subdomains=True)["domains"]) pre_result = hook_callback("conf_regen", names, pre_callback=_pre_call, env=env)