YunoHost-Apps / Experimental_helpers

6 stars 12 forks source link

ynh_install_php and YNH_APP_ID #38

Closed yalh76 closed 5 years ago

yalh76 commented 5 years ago

sorry a new one...

when using ynh_install_php, it stores the $YNH_APP_ID in /etc/php/ynh_app_version https://github.com/YunoHost-Apps/Experimental_helpers/blob/95c9dbbaed1608356dd03578467cd39c62d876ca/ynh_install_php/ynh_install_php__3#L24

If you install two times the same application same version, (imagine you are a weird geek guy like me) for example one public instance and one private instance, as each instance has the same $YNH_APP_ID, the $YNH_APP_ID:$phpversion will be only one time in /etc/php/ynh_app_version (just tested on pixelfed_ynh).

If you install one instance, it will uninstall the PHP version still used by the other instance...

Wouldn't it be possible to use the instance name, usually $app or in my example pixelfed and pixelfed__2 instead of $YNH_APP_ID

maniackcrudelis commented 5 years ago

Right, missed that one, there's another variable for that: $YNH_APP_INSTANCE_NAME

yalh76 commented 5 years ago

I though so but didn't knew the variable