1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/roundcube_ynh.git synced 2024-09-03 20:16:28 +02:00

[fix] php-fpm.ini for upgrade/restore/backup

This commit is contained in:
magikcypress 2017-06-17 23:26:47 +02:00
parent 3e78e6cc8c
commit ee33d1aa61
No known key found for this signature in database
GPG key ID: 3B3C7CD61957AC9A
4 changed files with 12 additions and 10 deletions

3
conf/php-fpm.ini Normal file
View file

@ -0,0 +1,3 @@
upload_max_filesize=30M
post_max_size=30M
; max_execution_time=60

View file

@ -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

View file

@ -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

View file

@ -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)