mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
fix: YNH_MAIN_DOMAINS env variable in regenconf
Also... `yunohost domain list --output-as plain` also print "#domain" and "#main" so this used to create wierd files in /var/lib/metronome/
This commit is contained in:
parent
ab0b66425c
commit
a51738f1c3
2 changed files with 2 additions and 5 deletions
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue