From ee33d1aa6197cef57701a93bce12b2bd06d49721 Mon Sep 17 00:00:00 2001 From: magikcypress Date: Sat, 17 Jun 2017 23:26:47 +0200 Subject: [PATCH] [fix] php-fpm.ini for upgrade/restore/backup --- conf/php-fpm.ini | 3 +++ scripts/backup | 4 +++- scripts/restore | 6 +++--- scripts/upgrade | 9 +++------ 4 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 conf/php-fpm.ini diff --git a/conf/php-fpm.ini b/conf/php-fpm.ini new file mode 100644 index 0000000..55e2ba7 --- /dev/null +++ b/conf/php-fpm.ini @@ -0,0 +1,3 @@ +upload_max_filesize=30M +post_max_size=30M +; max_execution_time=60 \ No newline at end of file diff --git a/scripts/backup b/scripts/backup index 1d0528c..fa50dd7 100644 --- a/scripts/backup +++ b/scripts/backup @@ -21,9 +21,11 @@ dbuser=$app finalpath="/var/www/$app" ynh_backup "$finalpath" "sources" -# Copy the conf files +# Copy the nginx conf files ynh_backup "/etc/nginx/conf.d/${domain}.d/${app}.conf" "nginx.conf" +# Copy the php-fpm conf files ynh_backup "/etc/php5/fpm/pool.d/${app}.conf" "php-fpm.conf" +ynh_backup "/etc/php5/fpm/conf.d/20-${app}.ini" "php-fpm.ini" # Dump the database mysqldump -u "$dbuser" -p"$dbpass" --no-create-db "$dbname" > ./dump.sql diff --git a/scripts/restore b/scripts/restore index ab00a89..75c17c8 100644 --- a/scripts/restore +++ b/scripts/restore @@ -66,11 +66,11 @@ ynh_mysql_create_db $dbname $dbuser $dbpass ynh_mysql_connect_as $dbuser $dbpass $dbname < ./dump.sql # Restore configuration files -sudo cp -a ./conf/nginx.conf "${nginx_conf}" +sudo cp -a ./nginx.conf "${nginx_conf}" # Restore php-fpm configuration files -sudo cp -a ./conf/php-fpm.conf "${phpfpm_conf}" -sudo cp -a ./conf/php-fpm.ini "${phpfpm_ini}" +sudo cp -a ./php-fpm.conf "${phpfpm_conf}" +sudo cp -a ./php-fpm.ini "${phpfpm_ini}" # Reload service sudo systemctl reload php5-fpm diff --git a/scripts/upgrade b/scripts/upgrade index 32d3c3d..91b93a6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -4,9 +4,9 @@ set -eu if [ ! -e _common.sh ]; then - # Get file fonction if not been to the current directory - sudo cp ../settings/scripts/_common.sh ./_common.sh - sudo chmod a+rx _common.sh + # Get file fonction if not been to the current directory + sudo cp ../settings/scripts/_common.sh ./_common.sh + sudo chmod a+rx _common.sh fi # Loads the generic functions usually used in the script source _common.sh @@ -15,9 +15,6 @@ source /usr/share/yunohost/helpers app=$YNH_APP_INSTANCE_NAME -# Source app helpers -. /usr/share/yunohost/helpers - # Retrieve app settings domain=$(ynh_app_setting_get "$app" domain) path=$(ynh_app_setting_get "$app" path)