mirror of
https://github.com/YunoHost-Apps/wordpress_ynh.git
synced 2024-09-03 20:36:10 +02:00
Add all settings for config panel
This commit is contained in:
parent
acae00b583
commit
422cb3cc84
2 changed files with 18 additions and 3 deletions
|
@ -108,15 +108,23 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
|
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
|
||||||
|
|
||||||
|
fpm_footprint="medium"
|
||||||
|
fpm_free_footprint=0
|
||||||
|
|
||||||
# If the app is private, set the usage to low, otherwise to high.
|
# If the app is private, set the usage to low, otherwise to high.
|
||||||
if [ $is_public -eq 0 ]
|
if [ $is_public -eq 0 ]
|
||||||
then
|
then
|
||||||
usage=low
|
fpm_usage="low"
|
||||||
else
|
else
|
||||||
usage=high
|
fpm_usage="high"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
|
||||||
|
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
|
||||||
|
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
# Create a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config --usage=$usage --footprint=medium
|
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -29,6 +29,7 @@ overwrite_phpfpm=$(ynh_app_setting_get --app=$app --key=overwrite_phpfpm)
|
||||||
admin_mail_html=$(ynh_app_setting_get --app=$app --key=admin_mail_html)
|
admin_mail_html=$(ynh_app_setting_get --app=$app --key=admin_mail_html)
|
||||||
|
|
||||||
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
|
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
|
||||||
|
fpm_free_footprint=$(ynh_app_setting_get --app=$app --key=fpm_free_footprint)
|
||||||
fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage)
|
fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage)
|
||||||
|
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
|
@ -131,6 +132,12 @@ if [ -z "$fpm_footprint" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
|
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If fpm_free_footprint doesn't exist, create it
|
||||||
|
if [ -z "$fpm_free_footprint" ]; then
|
||||||
|
fpm_free_footprint=0
|
||||||
|
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
|
||||||
|
fi
|
||||||
|
|
||||||
# If fpm_usage doesn't exist, create it
|
# If fpm_usage doesn't exist, create it
|
||||||
if [ -z "$fpm_usage" ]; then
|
if [ -z "$fpm_usage" ]; then
|
||||||
# If the app is private, set the usage to low, otherwise to high.
|
# If the app is private, set the usage to low, otherwise to high.
|
||||||
|
|
Loading…
Add table
Reference in a new issue