mirror of
https://github.com/YunoHost-Apps/moodle_ynh.git
synced 2024-09-03 19:46:23 +02:00
Cleaning up
This commit is contained in:
parent
6f4bba7f1f
commit
8df25d3363
5 changed files with 9 additions and 5 deletions
|
@ -12,7 +12,7 @@
|
|||
"license": "GPL-3.0-or-later",
|
||||
"website": "https://moodle.org/",
|
||||
"demo": "https://sandbox.moodledemo.net/",
|
||||
"admindoc": "https://docs.moodle.org/311/en/Main_page",
|
||||
"admindoc": "https://docs.moodle.org/400/en/Main_page",
|
||||
"code": "https://github.com/moodle/moodle"
|
||||
},
|
||||
"license": "GPL-3.0-or-later",
|
||||
|
|
|
@ -40,6 +40,10 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
|
||||
ynh_backup --src_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE DATA DIR
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$data_path" --is_big
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -145,7 +145,7 @@ ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_config_p
|
|||
ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_config_plugins SET value='onlogin' WHERE plugin='auth_ldap' AND (name='field_updatelocal_firstname' OR name='field_updatelocal_lastname' OR name='field_updatelocal_email');"
|
||||
ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_config_plugins SET value='locked' WHERE plugin='auth_ldap' AND (name='field_lock_firstname' OR name='field_lock_lastname' OR name='field_lock_email');"
|
||||
|
||||
# The admin is an ldap user
|
||||
# The admin is an LDAP user
|
||||
ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_user SET auth='ldap' WHERE username='$admin';"
|
||||
|
||||
php$phpversion "$final_path/admin/cli/purge_caches.php"
|
||||
|
|
|
@ -43,7 +43,7 @@ ynh_remove_app_dependencies
|
|||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing Moodle main directory..." --weight=2
|
||||
ynh_script_progression --message="Removing app main directory..." --weight=2
|
||||
|
||||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="$final_path"
|
||||
|
|
|
@ -37,7 +37,7 @@ upgrade_type=$(ynh_check_app_version_changed)
|
|||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up Moodle before upgrading (may take a while)..." --weight=10
|
||||
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=10
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
|
@ -148,7 +148,7 @@ ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_config_p
|
|||
ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_config_plugins SET value='onlogin' WHERE plugin='auth_ldap' AND (name='field_updatelocal_firstname' OR name='field_updatelocal_lastname' OR name='field_updatelocal_email');"
|
||||
ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_config_plugins SET value='locked' WHERE plugin='auth_ldap' AND (name='field_lock_firstname' OR name='field_lock_lastname' OR name='field_lock_email');"
|
||||
|
||||
# The admin is an ldap user
|
||||
# The admin is an LDAP user
|
||||
ynh_psql_execute_as_root --database="$db_name" --sql="UPDATE public.mdl_user SET auth='ldap' WHERE username='$admin';"
|
||||
|
||||
php${phpversion} "$final_path/admin/cli/purge_caches.php"
|
||||
|
|
Loading…
Add table
Reference in a new issue