Previously the data directory was fixed to the GROCY_DATAPATH constant.
This commit allows overriding the default GROCY_DATAPATH location by the
FastCGI parameter `GROCY_DATAPATH`. Relative paths are modified and get
rooted at the top level grocy installation directory.
The previous behaviour is preserved in case the new parameter is absent.
The following example nginx config snippet shows how to run multiple
instances.
```nginx
server {
location /instance1/ {
alias /var/www/grocy/;
set $instance instance1;
try_files $uri @grocy;
}
location /instane2/ {
alias /var/www/grocy/;
set $instance instance2;
try_files $uri @grocy;
}
location @grocy {
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME index.php;
fastcgi_param GROCY_DATAPATH data/$instance;
}
}
```
* Added check if all dependencies are installed and config.php/config-dist.php exists
* Also check for php modules
* Uncomment code that was accidentally disabled for debug purposes