YunoHost-Apps / opensondage_ynh

OpenSondage for YunoHost
https://framadate.org/
GNU Affero General Public License v3.0
16 stars 14 forks source link

Domain 'mydomain.bug' unknown #67

Open Jioleoo opened 3 years ago

Jioleoo commented 3 years ago

Describe the bug

The install bug due to the wrong domain name used. My domain is somethine like 'my-domain.test' and the one that's not found is 'my.domain.test'

For me it's clear that it's due to this line in the install script :

# Modify the domain to be used in a regex
domain_regex=$(echo "$domain" | sed 's@-@.@g')

Context

Steps to reproduce

SiM commented 3 years ago

Hi, same problem here, with an existing Opensondage instance. The upgrade fails because of 'Domain foo.domain.tld unknown'. The domain currently used by Opensondage is 'foo-domain.tld'.

lenybernard commented 3 years ago

Same here. And indeed after a small investigating, there is a small bug around https://github.com/YunoHost-Apps/opensondage_ynh/blob/c28adad8ae4914bea47765d23e4c9492748c7400/scripts/install#L175.

The workaround for now is :

But next upgrade, it could fail because the buggy line also exists for upgrade case https://github.com/YunoHost-Apps/opensondage_ynh/blob/c28adad8ae4914bea47765d23e4c9492748c7400/scripts/upgrade#L231.