From 8b30a536cba3502384a434a19181239b3d87d70e Mon Sep 17 00:00:00 2001 From: --help Date: Sun, 13 Aug 2023 09:39:48 +0200 Subject: [PATCH] Try to setup the error code upgrade --- config_panel.toml | 2 +- manifest.toml | 8 +++++++- scripts/upgrade | 5 +++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/config_panel.toml b/config_panel.toml index aa5b049..113b804 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -21,7 +21,7 @@ name = "My Webapp configuration" [main.error] name = "Html Custom error" - [main.error.setting] + [main.error.errorfile] ask = "HTML Path" type = "string" default = "/404.html" diff --git a/manifest.toml b/manifest.toml index 97fd1e1..32879ee 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "My Webapp" description.en = "Custom Web app with SFTP access to serve static (HTML, CSS, JS) and PHP files" description.fr = "Application Web personnalisée avec accès SFTP pour servir des fichiers statiques (HTML, CSS, JS) et PHP" -version = "1.0~ynh16" +version = "1.0~ynh17" maintainers = [] @@ -58,6 +58,12 @@ ram.runtime = "50M" type = "boolean" default = false + [install.errorfile] + ask.en = "Define a path about the 404 error page" + ask.fr = "Definir un chemin pour la page d'erreur 404" + type = "path" + default = "/404.html" + [resources] [resources.system_user] diff --git a/scripts/upgrade b/scripts/upgrade index 19a6549..bf15aaa 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -90,6 +90,11 @@ then YNH_PHP_VERSION="$phpversion" fi +if [ $errorfile ] +then + echo add the error config +fi + # Create a dedicated NGINX config ynh_add_nginx_config ynh_add_config --template="example-custom-nginx-config.conf" --destination="$nginx_extra_conf_dir/sample.conf"