From 55a020b2fba443311c45834ef5a1c27bdc140bc2 Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 26 Jan 2023 00:26:55 +0700 Subject: [PATCH 1/6] fix session lifetime --- conf/extra_php-fpm.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf index cd7febe..b47fe31 100644 --- a/conf/extra_php-fpm.conf +++ b/conf/extra_php-fpm.conf @@ -10,3 +10,7 @@ ; php_admin_value[max_input_time] = 300 ; php_admin_value[memory_limit] = 256M ; php_admin_flag[short_open_tag] = On + +; Session lifetime to avoid disconnections on PWA mode +php_admin_value[session.gc_maxlifetime] = 2592000 +php_admin_value[session.cookie_lifetime] = 2592000 \ No newline at end of file From 2a7698f0bc9a70989838d82101401963f556552c Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 26 Jan 2023 00:41:23 +0700 Subject: [PATCH 2/6] Don't know why this was removed --- scripts/upgrade | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 615950e..afe1eaa 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -82,6 +82,10 @@ then ynh_setup_source --dest_dir="$final_path" --keep="config.php" fi +# Void and recreate final_path +ynh_secure_remove --file="$final_path" +ynh_exec_warn_less mkdir "$final_path" + chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" From b35450d2dcd09b0a9030ae0161af60f0b056d0e8 Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 26 Jan 2023 00:46:26 +0700 Subject: [PATCH 3/6] Stupid mistake --- scripts/upgrade | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index afe1eaa..a7100cb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,6 +74,10 @@ ynh_system_user_create --username=$app --home_dir="$final_path" # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +# Void and recreate final_path +ynh_secure_remove --file="$final_path" +ynh_exec_warn_less mkdir "$final_path" + if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=1 @@ -82,10 +86,6 @@ then ynh_setup_source --dest_dir="$final_path" --keep="config.php" fi -# Void and recreate final_path -ynh_secure_remove --file="$final_path" -ynh_exec_warn_less mkdir "$final_path" - chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" From c56f558fac48951d7ac02269c9e78b239346c668 Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 26 Jan 2023 01:07:17 +0700 Subject: [PATCH 4/6] Correct php version --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index b7e2a5e..f9f5492 100755 --- a/scripts/install +++ b/scripts/install @@ -102,8 +102,8 @@ popd ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage="low" --footprint="low" phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +ynh_add_fpm_config --usage="low" --footprint="low" #================================================= # NGINX CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index a7100cb..7325835 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -108,8 +108,8 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=1 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$phpversion --usage="low" --footprint="low" phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +ynh_add_fpm_config --phpversion=$phpversion --usage="low" --footprint="low" #================================================= # NGINX CONFIGURATION From 0671134f5f5a8596bf071c73fbd366ec59411041 Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 26 Jan 2023 01:12:59 +0700 Subject: [PATCH 5/6] Update upgrade --- scripts/upgrade | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 7325835..12c8d13 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -122,12 +122,12 @@ ynh_add_nginx_config #================================================= # CONFIGURATION UPGRADE #================================================= -#ynh_script_progression --message="Adding a configuration file..." --weight=1 +ynh_script_progression --message="Adding a configuration file..." --weight=1 -#ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php" +ynh_add_config --template="../conf/config.php" --destination="$final_path/config.php" -#chmod 400 "$final_path/config.php" -#chown $app:$app "$final_path/config.php" +chmod 400 "$final_path/config.php" +chown $app:$app "$final_path/config.php" #================================================= # GENERIC FINALIZATION From bd128f29dbfb793bebf23c46c8940fb59f264cbd Mon Sep 17 00:00:00 2001 From: Limezy Date: Thu, 26 Jan 2023 01:16:37 +0700 Subject: [PATCH 6/6] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 7e92268..a3bd664 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Menstrual cycle follow-up for natural family planning", "fr": "Suivi de cycle pour les méthodes naturelles de régulation de naissance" }, - "version": "7.0~ynh1", + "version": "7.0~ynh2", "url": "https://moncycle.app", "upstream": { "license": "CC-BY-NC-SA-4.0",