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->dataroot = '__DATA_PATH__';
|
||||||
$CFG->admin = 'admin';
|
$CFG->admin = 'admin';
|
||||||
|
|
||||||
|
$CFG->lang = '__LANGUAGE__';
|
||||||
|
|
||||||
$CFG->directorypermissions = 02777;
|
$CFG->directorypermissions = 02777;
|
||||||
|
|
||||||
require_once(__DIR__ . '/lib/setup.php'); // Do not edit
|
require_once(__DIR__ . '/lib/setup.php'); // Do not edit
|
||||||
|
|
|
@ -13,7 +13,6 @@ location __PATH__/ {
|
||||||
location ~ [^/]\.php(/|$) {
|
location ~ [^/]\.php(/|$) {
|
||||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||||
|
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
fastcgi_param REMOTE_USER $remote_user;
|
fastcgi_param REMOTE_USER $remote_user;
|
||||||
|
|
|
@ -58,7 +58,17 @@
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"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%/}
|
path=${new_path%/}
|
||||||
dir="__DIR__"
|
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
|
if [ "$new_path" == "/" ]; then
|
||||||
ynh_add_config --template="../conf/config-domain.php" --destination="$final_path/config.php"
|
ynh_add_config --template="../conf/config-domain.php" --destination="$final_path/config.php"
|
||||||
else
|
else
|
||||||
|
|
|
@ -72,8 +72,6 @@ db_user=$db_name
|
||||||
ynh_app_setting_set --app=$app --key=db_name --value=$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
|
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
|
# 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)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
data_path=$(ynh_app_setting_get --app=$app --key=data_path)
|
data_path=$(ynh_app_setting_get --app=$app --key=data_path)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
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)
|
site_name=$(ynh_app_setting_get --app=$app --key=site_name)
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
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
|
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
|
||||||
fi
|
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
|
# Cleaning legacy permissions
|
||||||
if ynh_legacy_permissions_exists; then
|
if ynh_legacy_permissions_exists; then
|
||||||
ynh_legacy_permissions_delete_all
|
ynh_legacy_permissions_delete_all
|
||||||
|
|
Loading…
Add table
Reference in a new issue