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
639cac82f8
commit
38a2b2964f
5 changed files with 5 additions and 22 deletions
|
@ -3,7 +3,6 @@
|
|||
domain="domain.tld"
|
||||
path="/path"
|
||||
admin="john"
|
||||
language="fr"
|
||||
site_name="Moodle"
|
||||
is_public=1
|
||||
; Checks
|
||||
|
|
|
@ -60,16 +60,6 @@
|
|||
"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": ["en", "fr"],
|
||||
"default": "fr"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -26,9 +26,12 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||
|
||||
# Needed for helper "ynh_add_nginx_config"
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
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
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
|
||||
|
|
|
@ -24,7 +24,6 @@ domain=$YNH_APP_ARG_DOMAIN
|
|||
path_url=$YNH_APP_ARG_PATH
|
||||
admin=$YNH_APP_ARG_ADMIN
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
language=$YNH_APP_ARG_LANGUAGE
|
||||
site_name=$YNH_APP_ARG_SITE_NAME
|
||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||
password=$(ynh_string_random --length=30)
|
||||
|
@ -50,7 +49,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
|
|||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||
ynh_app_setting_set --app=$app --key=site_name --value=$site_name
|
||||
|
||||
#=================================================
|
||||
|
@ -129,7 +127,7 @@ chown -R $app:www-data "$data_path"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Setting up the application..." --weight=19
|
||||
|
||||
php${phpversion} "$final_path/admin/cli/install.php" --wwwroot="https://${domain}${path_url%/}" --dataroot="$data_path" --dbtype='pgsql' --dbname="$db_name" --dbuser="$db_name" --dbpass="$db_pwd" --lang="$language" --adminuser="$admin" --adminpass="$password" --adminemail="$email" --fullname="$site_name" --shortname="$site_name" --non-interactive --agree-license
|
||||
php${phpversion} "$final_path/admin/cli/install.php" --wwwroot="https://${domain}${path_url%/}" --dataroot="$data_path" --dbtype='pgsql' --dbname="$db_name" --dbuser="$db_name" --dbpass="$db_pwd" --adminuser="$admin" --adminpass="$password" --adminemail="$email" --fullname="$site_name" --shortname="$site_name" --non-interactive --agree-license
|
||||
|
||||
# Calculate and store the config file checksum into the app settings
|
||||
ynh_store_file_checksum "$final_path/config.php"
|
||||
|
|
|
@ -22,7 +22,6 @@ 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)
|
||||
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)
|
||||
|
||||
|
@ -56,12 +55,6 @@ if [ -z "$admin" ]; then
|
|||
ynh_die --message="This app can't be upgraded from a very old version of the package. Please remove and reinstall Moodle"
|
||||
fi
|
||||
|
||||
# If the language is not defined
|
||||
if [ -z "$language" ]; then
|
||||
language="fr"
|
||||
ynh_app_setting_set --app=$app --key=language --value=$language
|
||||
fi
|
||||
|
||||
# If the site_name is not defined
|
||||
if [ -z "$site_name" ]; then
|
||||
site_name="YunoHost"
|
||||
|
|
Loading…
Add table
Reference in a new issue