From 78c1776113f39a2955095da0760960fda96decdf Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 31 Mar 2019 21:28:40 +0200 Subject: [PATCH 01/18] backup script cleanup --- scripts/backup | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/scripts/backup b/scripts/backup index 8871560e..cdaf227c 100644 --- a/scripts/backup +++ b/scripts/backup @@ -14,10 +14,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. - true -} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -56,34 +52,12 @@ ynh_print_info "Backing up php-fpm configuration..." ynh_backup "/etc/php/7.2/fpm/pool.d/$app.conf" #================================================= -# BACKUP THE PostgreSQL DATABASE +# BACKUP THE POSTGRESQL DATABASE #================================================= ynh_print_info "Backing up the PostgreSQL database..." ynh_psql_dump_db "$db_name" > db.sql -#================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP LOGROTATE -#================================================= -ynh_print_info "Backing up logrotate configuration..." - -ynh_backup "/etc/logrotate.d/$app" - -#================================================= -# BACKUP SYSTEMD -#================================================= -ynh_print_info "Backing up systemd configuration..." - -ynh_backup "/etc/systemd/system/$app.service" - -#================================================= -# BACKUP A CRON FILE -#================================================= - -ynh_backup "/etc/cron.d/$app" - #================================================= # END OF SCRIPT #================================================= From 734cf8778f074d4f44b0487a3e4a5aed99e71ab9 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 31 Mar 2019 21:30:19 +0200 Subject: [PATCH 02/18] restore script cleanup --- scripts/restore | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/scripts/restore b/scripts/restore index d9035164..9696c169 100644 --- a/scripts/restore +++ b/scripts/restore @@ -14,10 +14,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - #### Remove this function if there's nothing to clean before calling the remove script. - true -} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -91,7 +87,7 @@ ynh_print_info "Reinstalling dependencies..." ynh_install_app_dependencies "$pkg_dependencies" #================================================= -# RESTORE THE PostgreSQL DATABASE +# RESTORE THE POSTGRESQL DATABASE #================================================= ynh_print_info "Restoring the PostgreSQL database..." @@ -99,32 +95,6 @@ ynh_psql_test_if_first_run ynh_psql_create_db "$db_name" "$db_name" "$db_pwd" ynh_psql_execute_file_as_root ./db.sql "$db_name" -#================================================= -# RESTORE SYSTEMD -#================================================= -ynh_print_info "Restoring the systemd configuration..." - -ynh_restore_file "/etc/systemd/system/$app.service" -systemctl enable "$app".service - -#================================================= -# ADVERTISE SERVICE IN ADMIN PANEL -#================================================= - -yunohost service add "$app" --log "/var/log/$app/$app.log" - -#================================================= -# RESTORE THE CRON FILE -#================================================= - -ynh_restore_file "/etc/cron.d/$app" - -#================================================= -# RESTORE THE LOGROTATE CONFIGURATION -#================================================= - -ynh_restore_file "/etc/logrotate.d/$app" - #================================================= # GENERIC FINALIZATION #================================================= From e8f8164a3ca05545495bd5b9e651b265281ceffc Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 31 Mar 2019 21:31:36 +0200 Subject: [PATCH 03/18] Fix final_path owner --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 9696c169..99761488 100644 --- a/scripts/restore +++ b/scripts/restore @@ -68,7 +68,7 @@ ynh_system_user_create "$app" #================================================= # Restore permissions on app files -chown -R root: "$final_path" +chown -R "$app": "$final_path" #================================================= # RESTORE THE PHP-FPM CONFIGURATION From fe44c98eaac2eab429daafaf86143211adae27e3 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 31 Mar 2019 21:32:15 +0200 Subject: [PATCH 04/18] Add PHP installation --- scripts/restore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/restore b/scripts/restore index 99761488..38b43353 100644 --- a/scripts/restore +++ b/scripts/restore @@ -84,6 +84,8 @@ ynh_restore_file "/etc/php/7.2/fpm/pool.d/$app.conf" ynh_print_info "Reinstalling dependencies..." # Define and install dependencies +ynh_install_php --phpversion="7.2" + ynh_install_app_dependencies "$pkg_dependencies" #================================================= From 3b95413fa0fbef84ea82ff23f8a060e54e75c391 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 31 Mar 2019 21:33:18 +0200 Subject: [PATCH 05/18] move php+fpm restoration after php installation --- scripts/restore | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/restore b/scripts/restore index 38b43353..549039d4 100644 --- a/scripts/restore +++ b/scripts/restore @@ -70,12 +70,6 @@ ynh_system_user_create "$app" # Restore permissions on app files chown -R "$app": "$final_path" -#================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= - -ynh_restore_file "/etc/php/7.2/fpm/pool.d/$app.conf" - #================================================= # SPECIFIC RESTORATION #================================================= @@ -97,6 +91,12 @@ ynh_psql_test_if_first_run ynh_psql_create_db "$db_name" "$db_name" "$db_pwd" ynh_psql_execute_file_as_root ./db.sql "$db_name" +#================================================= +# RESTORE THE PHP-FPM CONFIGURATION +#================================================= + +ynh_restore_file "/etc/php/7.2/fpm/pool.d/$app.conf" + #================================================= # GENERIC FINALIZATION #================================================= From 03ed439e003498d84a7419824c09c3b2dfc57b89 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 31 Mar 2019 21:48:23 +0200 Subject: [PATCH 06/18] Activate backup_restore check --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index 901667fe..8d6c7569 100644 --- a/check_process +++ b/check_process @@ -10,7 +10,7 @@ setup_private=0 setup_public=0 upgrade=0 - backup_restore=0 + backup_restore=1 multi_instance=0 incorrect_path=0 port_already_use=0 From a735d5718c374d29cfe87c8a0190883e885b6a36 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 31 Mar 2019 22:51:17 +0200 Subject: [PATCH 07/18] Cleanup script --- scripts/upgrade | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 843069f0..87a042b5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -123,28 +123,10 @@ ynh_add_fpm_config # ... #================================================= -### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script. -### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it. ynh_backup_if_checksum_is_different "$final_path/CONFIG_FILE" # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum "$final_path/CONFIG_FILE" -#================================================= -# SETUP LOGROTATE -#================================================= -ynh_print_info "Upgrading logrotate configuration..." - -# Use logrotate to manage app-specific logfile(s) -ynh_use_logrotate --non-append - -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_print_info "Upgrading systemd configuration..." - -# Create a dedicated systemd config -ynh_add_systemd_config - #================================================= # GENERIC FINALIZATION #================================================= From 6a36abe2a6bedc5b6dafe02bec1d1fb537df8209 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 31 Mar 2019 23:09:51 +0200 Subject: [PATCH 08/18] Fix upgarde script --- scripts/upgrade | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 87a042b5..8e9922ea 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -99,6 +99,8 @@ ynh_add_nginx_config #================================================= ynh_print_info "Upgrading dependencies..." +ynh_install_php --phpversion="7.2" + ynh_install_app_dependencies "$pkg_dependencies" #================================================= @@ -115,17 +117,43 @@ ynh_system_user_create "$app" ynh_print_info "Upgrading php-fpm configuration..." # Create a dedicated php-fpm config -ynh_add_fpm_config +ynh_add_fpm_config --phpversion="7.2" + +#Ugly move waiting 'ynh_add_fpm_config --phpversion='' released +mv -f "/etc/php/7.0/fpm/pool.d/$app.conf" "/etc/php/7.2/fpm/pool.d/$app.conf" +systemctl reload php7.0-fpm +systemctl reload php7.2-fpm #================================================= # SPECIFIC UPGRADE #================================================= -# ... +# INSTALL PHP DEPENDENCIES #================================================= +chown -R "$app": "$final_path" + +ynh_install_composer --workdir="$final_path" + +#================================================= +# DEPLOYMENT +#================================================= + +pushd "$final_path" + php7.2 artisan config:clear + php7.2 artisan config:cache + php7.2 artisan route:clear + php7.2 artisan route:cache + php7.2 artisan storage:link + php7.2 artisan migrate --force + php7.2 artisan update + php7.2 artisan horizon:purge +popd + + + ynh_backup_if_checksum_is_different "$final_path/CONFIG_FILE" # Recalculate and store the checksum of the file for the next upgrade. -ynh_store_file_checksum "$final_path/CONFIG_FILE" +ynh_store_file_checksum "$final_path/.env" #================================================= # GENERIC FINALIZATION @@ -134,7 +162,7 @@ ynh_store_file_checksum "$final_path/CONFIG_FILE" #================================================= # Set permissions on app files -chown -R root: "$final_path" +chown -R "$app": "$final_path" #================================================= # SETUP SSOWAT From 4073e76c1712b01f6555ce454a68f61bebaed5f9 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 31 Mar 2019 23:15:34 +0200 Subject: [PATCH 09/18] Activate upgrade check --- check_process | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/check_process b/check_process index 8d6c7569..74293a75 100644 --- a/check_process +++ b/check_process @@ -9,7 +9,8 @@ setup_nourl=0 setup_private=0 setup_public=0 - upgrade=0 + upgrade=1 + upgrade=1 from_commit=a2549aa86776cf7a88c0be9c34c4de4cf348f8d3 backup_restore=1 multi_instance=0 incorrect_path=0 From e68231e80dbdcb51d596edf2adf49ebe22e74bbe Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 1 Apr 2019 00:47:40 +0200 Subject: [PATCH 10/18] fix php-fpm upgrade --- scripts/upgrade | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 8e9922ea..43e89c46 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -116,6 +116,10 @@ ynh_system_user_create "$app" #================================================= ynh_print_info "Upgrading php-fpm configuration..." +mv -f "/etc/php/7.2/fpm/pool.d/$app.conf" "/etc/php/7.0/fpm/pool.d/$app.conf" +systemctl reload php7.0-fpm +systemctl reload php7.2-fpm + # Create a dedicated php-fpm config ynh_add_fpm_config --phpversion="7.2" From 2b661d3e2e1875f5b53f2be999440e4c6f2ca44c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 1 Apr 2019 01:16:05 +0200 Subject: [PATCH 11/18] remove upgrade from non working version --- check_process | 1 - 1 file changed, 1 deletion(-) diff --git a/check_process b/check_process index 74293a75..45e5c5e6 100644 --- a/check_process +++ b/check_process @@ -10,7 +10,6 @@ setup_private=0 setup_public=0 upgrade=1 - upgrade=1 from_commit=a2549aa86776cf7a88c0be9c34c4de4cf348f8d3 backup_restore=1 multi_instance=0 incorrect_path=0 From ec26cf58e131843eb2325c7a571b53de4413a471 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 1 Apr 2019 02:54:54 +0200 Subject: [PATCH 12/18] fix php-fpm --- scripts/install | 5 ++--- scripts/remove | 9 ++++----- scripts/upgrade | 13 +++---------- 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/scripts/install b/scripts/install index 4c263969..ef9b9e32 100644 --- a/scripts/install +++ b/scripts/install @@ -106,9 +106,8 @@ ynh_print_info "Configuring php-fpm..." # Create a dedicated php-fpm config ynh_add_fpm_config --phpversion="7.2" -#Ugly move waiting 'ynh_add_fpm_config --phpversion='' released -mv "/etc/php/7.0/fpm/pool.d/$app.conf" "/etc/php/7.2/fpm/pool.d/$app.conf" -systemctl reload php7.0-fpm +#Workaround waiting 'ynh_add_fpm_config --phpversion='' released +cp "/etc/php/7.0/fpm/pool.d/$app.conf" "/etc/php/7.2/fpm/pool.d/$app.conf" systemctl reload php7.2-fpm #================================================= diff --git a/scripts/remove b/scripts/remove index 5784d04e..7bea232a 100644 --- a/scripts/remove +++ b/scripts/remove @@ -47,14 +47,13 @@ ynh_remove_nginx_config #================================================= ynh_print_info "Removing php-fpm configuration" -#Ugly move waiting 'ynh_add_fpm_config --phpversion='' released -mv "/etc/php/7.2/fpm/pool.d/$app.conf" "/etc/php/7.0/fpm/pool.d/$app.conf" -systemctl reload php7.2-fpm -systemctl reload php7.0-fpm - # Remove the dedicated php-fpm config ynh_remove_fpm_config +#Workaround waiting 'ynh_add_fpm_config --phpversion='' released +ynh_secure_remove "/etc/php/7.2/fpm/pool.d/$app.conf" +systemctl reload php7.2-fpm + #================================================= # REMOVE DEPENDENCIES #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 43e89c46..a8299a8f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -116,16 +116,11 @@ ynh_system_user_create "$app" #================================================= ynh_print_info "Upgrading php-fpm configuration..." -mv -f "/etc/php/7.2/fpm/pool.d/$app.conf" "/etc/php/7.0/fpm/pool.d/$app.conf" -systemctl reload php7.0-fpm -systemctl reload php7.2-fpm - # Create a dedicated php-fpm config ynh_add_fpm_config --phpversion="7.2" -#Ugly move waiting 'ynh_add_fpm_config --phpversion='' released -mv -f "/etc/php/7.0/fpm/pool.d/$app.conf" "/etc/php/7.2/fpm/pool.d/$app.conf" -systemctl reload php7.0-fpm +#Workaround waiting 'ynh_add_fpm_config --phpversion='' released +cp -f "/etc/php/7.0/fpm/pool.d/$app.conf" "/etc/php/7.2/fpm/pool.d/$app.conf" systemctl reload php7.2-fpm #================================================= @@ -153,9 +148,7 @@ pushd "$final_path" php7.2 artisan horizon:purge popd - - -ynh_backup_if_checksum_is_different "$final_path/CONFIG_FILE" +ynh_backup_if_checksum_is_different "$final_path/.env" # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum "$final_path/.env" From bb89459f9148e1ada7a188bd61af3beb2c3d7bb5 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 1 Apr 2019 06:12:43 +0200 Subject: [PATCH 13/18] Revert "fix php-fpm" This reverts commit ec26cf58e131843eb2325c7a571b53de4413a471. --- scripts/install | 5 +++-- scripts/remove | 9 +++++---- scripts/upgrade | 13 ++++++++++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/scripts/install b/scripts/install index ef9b9e32..4c263969 100644 --- a/scripts/install +++ b/scripts/install @@ -106,8 +106,9 @@ ynh_print_info "Configuring php-fpm..." # Create a dedicated php-fpm config ynh_add_fpm_config --phpversion="7.2" -#Workaround waiting 'ynh_add_fpm_config --phpversion='' released -cp "/etc/php/7.0/fpm/pool.d/$app.conf" "/etc/php/7.2/fpm/pool.d/$app.conf" +#Ugly move waiting 'ynh_add_fpm_config --phpversion='' released +mv "/etc/php/7.0/fpm/pool.d/$app.conf" "/etc/php/7.2/fpm/pool.d/$app.conf" +systemctl reload php7.0-fpm systemctl reload php7.2-fpm #================================================= diff --git a/scripts/remove b/scripts/remove index 7bea232a..5784d04e 100644 --- a/scripts/remove +++ b/scripts/remove @@ -47,13 +47,14 @@ ynh_remove_nginx_config #================================================= ynh_print_info "Removing php-fpm configuration" +#Ugly move waiting 'ynh_add_fpm_config --phpversion='' released +mv "/etc/php/7.2/fpm/pool.d/$app.conf" "/etc/php/7.0/fpm/pool.d/$app.conf" +systemctl reload php7.2-fpm +systemctl reload php7.0-fpm + # Remove the dedicated php-fpm config ynh_remove_fpm_config -#Workaround waiting 'ynh_add_fpm_config --phpversion='' released -ynh_secure_remove "/etc/php/7.2/fpm/pool.d/$app.conf" -systemctl reload php7.2-fpm - #================================================= # REMOVE DEPENDENCIES #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index a8299a8f..43e89c46 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -116,11 +116,16 @@ ynh_system_user_create "$app" #================================================= ynh_print_info "Upgrading php-fpm configuration..." +mv -f "/etc/php/7.2/fpm/pool.d/$app.conf" "/etc/php/7.0/fpm/pool.d/$app.conf" +systemctl reload php7.0-fpm +systemctl reload php7.2-fpm + # Create a dedicated php-fpm config ynh_add_fpm_config --phpversion="7.2" -#Workaround waiting 'ynh_add_fpm_config --phpversion='' released -cp -f "/etc/php/7.0/fpm/pool.d/$app.conf" "/etc/php/7.2/fpm/pool.d/$app.conf" +#Ugly move waiting 'ynh_add_fpm_config --phpversion='' released +mv -f "/etc/php/7.0/fpm/pool.d/$app.conf" "/etc/php/7.2/fpm/pool.d/$app.conf" +systemctl reload php7.0-fpm systemctl reload php7.2-fpm #================================================= @@ -148,7 +153,9 @@ pushd "$final_path" php7.2 artisan horizon:purge popd -ynh_backup_if_checksum_is_different "$final_path/.env" + + +ynh_backup_if_checksum_is_different "$final_path/CONFIG_FILE" # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum "$final_path/.env" From 7b3a3e78927701a055876c5ae4cfbc11d2861786 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 1 Apr 2019 06:17:25 +0200 Subject: [PATCH 14/18] Fix php-fpm --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 43e89c46..4e1d2624 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -117,8 +117,8 @@ ynh_system_user_create "$app" ynh_print_info "Upgrading php-fpm configuration..." mv -f "/etc/php/7.2/fpm/pool.d/$app.conf" "/etc/php/7.0/fpm/pool.d/$app.conf" -systemctl reload php7.0-fpm systemctl reload php7.2-fpm +systemctl reload php7.0-fpm # Create a dedicated php-fpm config ynh_add_fpm_config --phpversion="7.2" From 8f7e97629b685ea24757d937874fb85c4c2bc5b5 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 1 Apr 2019 07:30:55 +0200 Subject: [PATCH 15/18] Update php-fpm upgrade --- scripts/upgrade | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 4e1d2624..8883b7f8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -116,7 +116,8 @@ ynh_system_user_create "$app" #================================================= ynh_print_info "Upgrading php-fpm configuration..." -mv -f "/etc/php/7.2/fpm/pool.d/$app.conf" "/etc/php/7.0/fpm/pool.d/$app.conf" +#Ugly move waiting 'ynh_add_fpm_config --phpversion='' released +mv "/etc/php/7.2/fpm/pool.d/$app.conf" "/etc/php/7.0/fpm/pool.d/$app.conf" systemctl reload php7.2-fpm systemctl reload php7.0-fpm @@ -124,7 +125,7 @@ systemctl reload php7.0-fpm ynh_add_fpm_config --phpversion="7.2" #Ugly move waiting 'ynh_add_fpm_config --phpversion='' released -mv -f "/etc/php/7.0/fpm/pool.d/$app.conf" "/etc/php/7.2/fpm/pool.d/$app.conf" +mv "/etc/php/7.0/fpm/pool.d/$app.conf" "/etc/php/7.2/fpm/pool.d/$app.conf" systemctl reload php7.0-fpm systemctl reload php7.2-fpm From 924d805b4cf96c6c34b485c3dbe5ebf8d4707611 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 1 Apr 2019 19:53:50 +0200 Subject: [PATCH 16/18] Fix php-fpm --- scripts/remove | 8 ++++++++ scripts/upgrade | 6 ++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/remove b/scripts/remove index 5784d04e..f8bd8478 100644 --- a/scripts/remove +++ b/scripts/remove @@ -82,6 +82,14 @@ ynh_print_info "Removing the dedicated system user" # Delete a system user ynh_system_user_delete "$app" +#================================================= +# START PHP-FPM 7.0 FPM +#================================================= +ynh_print_info "Start php7.0-fpm" + +#Sometimes with package_check php7.0-fpm fail to reload and stop. So starting the service, just in case. +systemctl start php7.0-fpm + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 8883b7f8..ba7bb706 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -117,7 +117,8 @@ ynh_system_user_create "$app" ynh_print_info "Upgrading php-fpm configuration..." #Ugly move waiting 'ynh_add_fpm_config --phpversion='' released -mv "/etc/php/7.2/fpm/pool.d/$app.conf" "/etc/php/7.0/fpm/pool.d/$app.conf" +mv -f "/etc/php/7.2/fpm/pool.d/$app.conf" "/etc/php/7.0/fpm/pool.d/$app.conf" +sleep 5 systemctl reload php7.2-fpm systemctl reload php7.0-fpm @@ -125,7 +126,8 @@ systemctl reload php7.0-fpm ynh_add_fpm_config --phpversion="7.2" #Ugly move waiting 'ynh_add_fpm_config --phpversion='' released -mv "/etc/php/7.0/fpm/pool.d/$app.conf" "/etc/php/7.2/fpm/pool.d/$app.conf" +mv -f "/etc/php/7.0/fpm/pool.d/$app.conf" "/etc/php/7.2/fpm/pool.d/$app.conf" +sleep 5 systemctl reload php7.0-fpm systemctl reload php7.2-fpm From 23b328182ca8f0c6d9fd0614fae6b1a7408ee65e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 1 Apr 2019 19:55:18 +0200 Subject: [PATCH 17/18] Change version number --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 7bec3d1c..e49f9740 100644 --- a/manifest.json +++ b/manifest.json @@ -5,7 +5,7 @@ "description": { "en": "ActivityPub Federated Image Sharing" }, - "version": "0.8.4~ynh1", + "version": "0.8.4~ynh3", "url": "https://pixelfed.org/", "license": "AGPL-3.0-or-later", "maintainer": { From 784657c4a05762a8afc45f5f4b985740f8c74c50 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Thu, 4 Apr 2019 11:33:20 +0200 Subject: [PATCH 18/18] Fix upgrade after restoration --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 549039d4..0e73f36a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -88,7 +88,7 @@ ynh_install_app_dependencies "$pkg_dependencies" ynh_print_info "Restoring the PostgreSQL database..." ynh_psql_test_if_first_run -ynh_psql_create_db "$db_name" "$db_name" "$db_pwd" +ynh_psql_setup_db "$db_name" "$db_name" "$db_pwd" ynh_psql_execute_file_as_root ./db.sql "$db_name" #=================================================