mirror of
https://github.com/YunoHost-Apps/moodle_ynh.git
synced 2024-09-03 19:46:23 +02:00
Fix
This commit is contained in:
parent
7c1177a4fd
commit
5abb1b9af4
6 changed files with 20 additions and 11 deletions
|
@ -21,6 +21,8 @@ $CFG->wwwroot = 'https://__DOMAIN__';
|
|||
$CFG->dataroot = '__DATA_PATH__';
|
||||
$CFG->admin = 'admin';
|
||||
|
||||
$CFG->lang = '__LANGUAGE__';
|
||||
|
||||
$CFG->directorypermissions = 02777;
|
||||
|
||||
require_once(__DIR__ . '/lib/setup.php'); // Do not edit
|
||||
|
|
|
@ -13,7 +13,6 @@ location __PATH__/ {
|
|||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param REMOTE_USER $remote_user;
|
||||
|
|
|
@ -58,7 +58,17 @@
|
|||
"name": "is_public",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "language",
|
||||
"type": "string",
|
||||
"ask": {
|
||||
"en": "Choose the application language",
|
||||
"fr": "Choisissez la langue de l'application"
|
||||
},
|
||||
"choices": ["fr", "en"],
|
||||
"default": "fr"
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -102,12 +102,6 @@ domain=${new_domain%/}
|
|||
path=${new_path%/}
|
||||
dir="__DIR__"
|
||||
|
||||
# if [ "$new_path" == "/" ]; then
|
||||
# ynh_replace_string --match_string="\$CFG->wwwroot = .*" --replace_string="\$CFG->wwwroot = \'https:\/\/${new_domain%\/}\';" --target_file="$final_path/config.php"
|
||||
# else
|
||||
# ynh_replace_string --match_string="\$CFG->wwwroot = .*" --replace_string="\$CFG->wwwroot = \'https:\/\/${new_domain}${new_path%\/}\';" --target_file="$final_path/config.php"
|
||||
# fi
|
||||
|
||||
if [ "$new_path" == "/" ]; then
|
||||
ynh_add_config --template="../conf/config-domain.php" --destination="$final_path/config.php"
|
||||
else
|
||||
|
|
|
@ -72,8 +72,6 @@ db_user=$db_name
|
|||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name
|
||||
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
|
|
|
@ -22,7 +22,7 @@ admin=$(ynh_app_setting_get --app=$app --key=admin)
|
|||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
data_path=$(ynh_app_setting_get --app=$app --key=data_path)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
db_user=$db_name
|
||||
language=$(ynh_app_setting_get --app=$app --key=language)
|
||||
site_name=$(ynh_app_setting_get --app=$app --key=site_name)
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
|
||||
|
@ -77,6 +77,12 @@ if [ -z "$fpm_usage" ]; then
|
|||
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
|
||||
fi
|
||||
|
||||
# If fpm_usage doesn't exist, create it
|
||||
if [ -z "$language" ]; then
|
||||
language=en
|
||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||
fi
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
|
Loading…
Add table
Reference in a new issue