YunoHost-Apps / shaarli_ynh

Shaarli package for YunoHost
GNU General Public License v3.0
20 stars 13 forks source link

Install script update, adding configuration and possibility to have a private instance #24

Closed rokaz closed 7 years ago

rokaz commented 7 years ago

Hi,

I'm pushing this one, it is pretty big, I'm sorry that I didn't break it up into separate pieces, if necessary I can do it later.

lapineige commented 7 years ago

What a big PR ^^ Thanks a lot, after a quick look it seems to be ok. I'll test installing it :)

lapineige commented 7 years ago

General question: I'm wondering if we should adapt the app name (I mean, the label), as multiple can be installed. So the administrator might be less confused, and if the user decide to install a private + a public instance (which is possible, isn't it ?), s.he will never mistake the apps.

lapineige commented 7 years ago

Install, backup and restore are working. Tested with single user Yunohost and 2 Shaarli private installations.

I did the same for a public install, and it's impossible to login.


In all cases, this message is raised:

Attention : PHP Notice: Undefined offset: 3 in /var/cache/yunohost/from_file/shaarli_ynh-install_script/conf/gen_hash.php on line 4

But I didn't figured out what's the issue, and saw no errors when using Shaarli.

rokaz commented 7 years ago

I don't know if it is possible to change the name of the instance, or to label it, we should ask the yunohost devs. Regarding the error you get, I don't know, if I remember correctly I also tested the app as a public site and didn't have problems to log in. I will check next week.

lapineige commented 7 years ago

I don't know if it is possible to change the name of the instance, or to label it, we should ask the yunohost devs.

You can, for instance with:

sudo yunohost app setting shaarli label -v "aNewLabel" sudo yunohost app ssowatconf

For instance I did it when migrating from Owncloud to Nextcloud. It worked like a charm.

rokaz commented 7 years ago

I tested the installation of a public site and I don't have any problem to log in, either if I am logged in as a Yunohost user (owner of the instance or not) or not logged in at all.

After looking at it, the error raised occurred during the install: the salt was not generated (exhaustion of /dev/urandom on your machine? maybe we should generate the salt with a different method?) and thus the hash generation failed. Could you check that the salt field in /var/www/$shaarli/data/config.json.php is empty? It should be empty on your system after this error and should not be on a working system. This would explain the impossibility to log in.