1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/moodle_ynh.git synced 2024-09-03 19:46:23 +02:00
This commit is contained in:
Éric Gaspar 2024-06-22 21:26:14 +02:00
parent 8d1384f584
commit 58db39e342
4 changed files with 1 additions and 44 deletions

View file

@ -17,7 +17,7 @@ admindoc = "https://docs.moodle.org/400/en/Main_page"
code = "https://github.com/moodle/moodle"
[integration]
yunohost = ">= 11.2"
yunohost = ">= 11.2.15"
helpers_version = "2.1"
architectures = "all"
multi_instance = true

View file

@ -24,18 +24,8 @@ ynh_backup "$data_dir"
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf"
#=================================================
# SPECIFIC BACKUP
#=================================================
# BACKUP VARIOUS FILES
#=================================================
ynh_backup "/etc/cron.d/$app"
#=================================================

View file

@ -10,18 +10,6 @@ source /usr/share/yunohost/helpers
email=$(ynh_user_get_info --username=$admin --key=mail)
password=$(ynh_string_random --length=30)
#REMOVEME? fpm_footprint="low"
#REMOVEME? fpm_free_footprint=0
#REMOVEME? fpm_usage="low"
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
ynh_app_setting_set --key=fpm_footprint --value=$fpm_footprint
ynh_app_setting_set --key=fpm_free_footprint --value=$fpm_free_footprint
ynh_app_setting_set --key=fpm_usage --value=$fpm_usage
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
@ -38,10 +26,8 @@ chown -R $app:www-data "$install_dir"
#=================================================
ynh_script_progression "Configuring PHP-FPM..."
# Create a dedicated PHP-FPM config
ynh_config_add_phpfpm
# Create a dedicated NGINX config
ynh_config_add_nginx
ynh_config_add --template="cron" --destination="/etc/cron.d/$app"
@ -55,7 +41,6 @@ ynh_script_progression "Setting up the application..."
php${php_version} -d max_input_vars=5000 "$install_dir/admin/cli/install.php" --wwwroot="https://${domain}${path%/}" --dataroot="$data_dir" --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 "$install_dir/config.php"
#=================================================

View file

@ -19,24 +19,6 @@ if [ -z "${site_name:-}" ]; then
ynh_app_setting_set --key=site_name --value=$site_name
fi
# If fpm_footprint doesn't exist, create it
if [ -z "${fpm_footprint:-}" ]; then
#REMOVEME? fpm_footprint=low
ynh_app_setting_set --key=fpm_footprint --value=$fpm_footprint
fi
# If fpm_free_footprint doesn't exist, create it
if [ -z "${fpm_free_footprint:-}" ]; then
#REMOVEME? fpm_free_footprint=0
ynh_app_setting_set --key=fpm_free_footprint --value=$fpm_free_footprint
fi
# If fpm_usage doesn't exist, create it
if [ -z "${fpm_usage:-}" ]; then
#REMOVEME? fpm_usage=low
ynh_app_setting_set --key=fpm_usage --value=$fpm_usage
fi
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================