mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
http-upload only available on maindomain (for the moment).
This commit is contained in:
parent
1f09abfa51
commit
ada95f8fca
2 changed files with 16 additions and 12 deletions
|
@ -42,16 +42,18 @@ do_post_regen() {
|
|||
regen_conf_files=$1
|
||||
|
||||
# retrieve variables
|
||||
main_domain=$(cat /etc/yunohost/current_host)
|
||||
domain_list=$(yunohost domain list --output-as plain --quiet)
|
||||
|
||||
# create metronome directories for domains
|
||||
for domain in $domain_list; 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"
|
||||
chmod g+s "/var/xmpp-upload/${domain}/upload"
|
||||
chown -R metronome:www-data "/var/xmpp-upload/${domain}"
|
||||
done
|
||||
# http_upload directory must be writable by metronome and readable by nginx
|
||||
mkdir -p "/var/xmpp-upload/${main_domain}/upload"
|
||||
chmod g+s "/var/xmpp-upload/${main_domain}/upload"
|
||||
chown -R metronome:www-data "/var/xmpp-upload/${main_domain}"
|
||||
|
||||
|
||||
# fix some permissions
|
||||
chown -R metronome: /var/lib/metronome/
|
||||
|
|
|
@ -43,6 +43,7 @@ from yunohost.utils.network import get_public_ip
|
|||
|
||||
from moulinette import m18n
|
||||
from yunohost.app import app_ssowatconf
|
||||
from yunohost.domain import _get_maindomain
|
||||
from yunohost.service import _run_service_command
|
||||
from yunohost.regenconf import regen_conf
|
||||
from yunohost.log import OperationLogger
|
||||
|
@ -639,6 +640,7 @@ def _prepare_certificate_signing_request(domain, key_file, output_folder):
|
|||
# Set the domain
|
||||
csr.get_subject().CN = domain
|
||||
|
||||
if domain == _get_maindomain():
|
||||
# Include xmpp-upload subdomain in subject alternate names
|
||||
subdomain="xmpp-upload." + domain
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue