Upstream app does not accept to install on a subpath anymore


I’m currently adapting æneria package to version 2 of the app (see Aeneria v2 by SimonMellerin · Pull Request #44 · YunoHost-Apps/aeneria_ynh · GitHub) and I’m facing an issue: version 1 of æneria could be installed under a path but it won’t be possible with version 2: the app will need its own domain.

Given that people may have already installed æneria under a path, what is the correct way to handle this ?

Could I add an extra step to upgrade script to:

  1. detect if the app is installed under a path
  2. if so, stop the upgrade
  3. display a message to tell to first move the app to its own domain before to upgrade


Have someone ever faced this kind of issue ?


1 Like

What makes you say this ? The app seems to be passing the test just fine …?

I tested the app manually: assets don’t load and Ajax calls fail :confused:

It was working in version 1 because of a trick I’ve made but it was not clean at all and it seems to not work with newer version of symfony encore. Also, the front of aeneria have been rewritten in vuejs in version 2 and the possibility for the app to be installed under a path has been completly forgotten… So the app does not work correctly under a path.

I’m not willing to fix this in aeneria, this is a lot of work, I think it’s not worth it.

In addition to what you described with detect+stop+message, I would suggest that you create a notification in doc/PRE_UPGRADE.d/{version}.md (cf. Adding documentation to your app | Yunohost Documentation), asking admins to move the app to a dedicated domain before even initiating the upgrade.


I agree with you @tituspijean I will also add that!

For my first proposal, do you know if variable $path exists in upgrade script even if the question [install.path] is not configured in manifest.toml ?

If so, what do you think of something like this at the beginning of the upgrade script:

if [ -n "$path" ]; then
   ynh_die --message="You should blabalbal"

For people passing by, here is what I have finally done:

In upgrade script:

# Before version 2.x æneria could be installed under a path,
# this functionnality has been deprecated since version 2.0.0 and æneria
# now need to be installed under its own domain.
# If the app is currently installed under a path, we warn the admin
# that he should move the app under its own domain
if [ "$path" != "/" ]; then
  ynh_die --message="Since version 2.0.0, $app need to be installed under its own domain. \
  Before upgrading, change $app URL: delete the path and switch to a new domain if needed."

+ doc/PRE_UPGRADE.d/

Since version 2, æneria must be installed under its own domain.

If æneria is currently installed under a path, before upgrading, change æneria URL:

* delete the path
* switch to a new dedicated domain (if needed)
1 Like