Compare commits
29 commits
helpers-2.
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
9a1cf68d98 | ||
|
f1545592a8 | ||
|
e59b8f1417 | ||
|
d291edbc72 | ||
|
6566e1ce4f | ||
|
991cab74e4 | ||
|
db825702a0 | ||
|
477d98f4a6 | ||
|
ea932c9763 | ||
|
a41c46b182 | ||
|
89fbb93c76 | ||
|
19f09d8569 | ||
|
db7dcbdd1b | ||
|
eca97b65aa | ||
|
7226257ce8 | ||
|
df628b6cd1 | ||
|
f92817b922 | ||
|
55c0bbb594 | ||
|
cb465e8573 | ||
|
72ae3827de | ||
|
f7e3c828ec | ||
|
7d29233133 | ||
|
81ecb8ba90 | ||
|
cefdd63e38 | ||
|
da1fc5e54b | ||
|
c886821dcd | ||
|
e4ff31c6c8 | ||
|
0f47d1c6cb | ||
|
cab30de685 |
18 changed files with 188 additions and 50 deletions
|
@ -1,7 +1,9 @@
|
|||
# All available README files by language
|
||||
|
||||
- [Read the README in English](README.md)
|
||||
- [Lea el README en español](README_es.md)
|
||||
- [Irakurri README euskaraz](README_eu.md)
|
||||
- [Lire le README en français](README_fr.md)
|
||||
- [Le o README en galego](README_gl.md)
|
||||
- [Baca README dalam bahasa bahasa Indonesia](README_id.md)
|
||||
- [阅读中文(简体)的 README](README_zh_Hans.md)
|
||||
|
|
|
@ -5,7 +5,7 @@ It shall NOT be edited by hand.
|
|||
|
||||
# My Webapp for YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/my_webapp)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/my_webapp/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=my_webapp)
|
||||
|
||||
|
@ -24,9 +24,10 @@ PHP-FPM version can also be selected among `none`, `7.4`, `8.0`, `8.1` and `8.2`
|
|||
|
||||
**Once installed, go to the chosen URL to know the user, domain and port you will have to use for the SFTP access.** The password is one you chosen during the installation. Under the Web directory, you will see a `www` folder which contains the public files served by this app. You can put all the files of your custom Web application inside.
|
||||
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an`error` folder in the `www` root directory, containing your custom `html` files.
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an `error` folder in the `www` root directory, containing your custom `html` files.
|
||||
|
||||
**Shipped version:** 1.0~ynh17
|
||||
|
||||
**Shipped version:** 1.0~ynh19
|
||||
## Documentation and resources
|
||||
|
||||
- Upstream app code repository: <https://github.com/YunoHost-Apps/my_webapp_ynh>
|
||||
|
|
49
README_es.md
Normal file
49
README_es.md
Normal file
|
@ -0,0 +1,49 @@
|
|||
<!--
|
||||
Este archivo README esta generado automaticamente<https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
|
||||
No se debe editar a mano.
|
||||
-->
|
||||
|
||||
# My Webapp para Yunohost
|
||||
|
||||
[](https://ci-apps.yunohost.org/ci/apps/my_webapp/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=my_webapp)
|
||||
|
||||
*[Leer este README en otros idiomas.](./ALL_README.md)*
|
||||
|
||||
> *Este paquete le permite instalarMy Webapp rapidamente y simplement en un servidor YunoHost.*
|
||||
> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.*
|
||||
|
||||
## Descripción general
|
||||
|
||||
This application allows you to easily install a custom Web application, providing files access with [SFTP](https://yunohost.org/en/filezilla).
|
||||
|
||||
It can also create a MySQL or PostgreSQL database - which will be backed up and restored with your application. The connection details will be stored in the file `db_access.txt` located in the root directory.
|
||||
|
||||
PHP-FPM version can also be selected among `none`, `7.4`, `8.0`, `8.1` and `8.2`.
|
||||
|
||||
**Once installed, go to the chosen URL to know the user, domain and port you will have to use for the SFTP access.** The password is one you chosen during the installation. Under the Web directory, you will see a `www` folder which contains the public files served by this app. You can put all the files of your custom Web application inside.
|
||||
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an `error` folder in the `www` root directory, containing your custom `html` files.
|
||||
|
||||
|
||||
**Versión actual:** 1.0~ynh19
|
||||
## Documentaciones y recursos
|
||||
|
||||
- Repositorio del código fuente oficial de la aplicación : <https://github.com/YunoHost-Apps/my_webapp_ynh>
|
||||
- Catálogo YunoHost: <https://apps.yunohost.org/app/my_webapp>
|
||||
- Reportar un error: <https://github.com/YunoHost-Apps/my_webapp_ynh/issues>
|
||||
|
||||
## Información para desarrolladores
|
||||
|
||||
Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing
|
||||
|
||||
Para probar la rama `testing`, sigue asÍ:
|
||||
|
||||
```bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
o
|
||||
sudo yunohost app upgrade my_webapp -u https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Mas informaciones sobre el empaquetado de aplicaciones:** <https://yunohost.org/packaging_apps>
|
|
@ -5,7 +5,7 @@ EZ editatu eskuz.
|
|||
|
||||
# My Webapp YunoHost-erako
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/my_webapp)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/my_webapp/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=my_webapp)
|
||||
|
||||
|
@ -24,9 +24,10 @@ PHP-FPM version can also be selected among `none`, `7.4`, `8.0`, `8.1` and `8.2`
|
|||
|
||||
**Once installed, go to the chosen URL to know the user, domain and port you will have to use for the SFTP access.** The password is one you chosen during the installation. Under the Web directory, you will see a `www` folder which contains the public files served by this app. You can put all the files of your custom Web application inside.
|
||||
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an`error` folder in the `www` root directory, containing your custom `html` files.
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an `error` folder in the `www` root directory, containing your custom `html` files.
|
||||
|
||||
**Paketatutako bertsioa:** 1.0~ynh17
|
||||
|
||||
**Paketatutako bertsioa:** 1.0~ynh19
|
||||
## Dokumentazioa eta baliabideak
|
||||
|
||||
- Jatorrizko aplikazioaren kode-gordailua: <https://github.com/YunoHost-Apps/my_webapp_ynh>
|
||||
|
|
|
@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.
|
|||
|
||||
# My Webapp pour YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/my_webapp)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/my_webapp/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=my_webapp)
|
||||
|
||||
|
@ -26,7 +26,7 @@ La version de PHP-FPM peut aussi être choisie, parmi `none`, `7.4`, `8.0`, `8.1
|
|||
|
||||
L'application vous permet aussi de gérer - si vous activez l'option dans le panneau de configuration - la gestion des erreurs 404, il vous suffit de créer un dossier `error` dans le répertoire racine `www` et d'y placer vos fichiers d'erreur `html`
|
||||
|
||||
**Version incluse :** 1.0~ynh17
|
||||
**Version incluse :** 1.0~ynh19
|
||||
## Documentations et ressources
|
||||
|
||||
- Dépôt de code officiel de l’app : <https://github.com/YunoHost-Apps/my_webapp_ynh>
|
||||
|
|
|
@ -5,7 +5,7 @@ NON debe editarse manualmente.
|
|||
|
||||
# My Webapp para YunoHost
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/my_webapp)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/my_webapp/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=my_webapp)
|
||||
|
||||
|
@ -24,9 +24,10 @@ PHP-FPM version can also be selected among `none`, `7.4`, `8.0`, `8.1` and `8.2`
|
|||
|
||||
**Once installed, go to the chosen URL to know the user, domain and port you will have to use for the SFTP access.** The password is one you chosen during the installation. Under the Web directory, you will see a `www` folder which contains the public files served by this app. You can put all the files of your custom Web application inside.
|
||||
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an`error` folder in the `www` root directory, containing your custom `html` files.
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an `error` folder in the `www` root directory, containing your custom `html` files.
|
||||
|
||||
**Versión proporcionada:** 1.0~ynh17
|
||||
|
||||
**Versión proporcionada:** 1.0~ynh19
|
||||
## Documentación e recursos
|
||||
|
||||
- Repositorio de orixe do código: <https://github.com/YunoHost-Apps/my_webapp_ynh>
|
||||
|
|
49
README_id.md
Normal file
49
README_id.md
Normal file
|
@ -0,0 +1,49 @@
|
|||
<!--
|
||||
N.B.: README ini dibuat secara otomatis oleh <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
|
||||
Ini TIDAK boleh diedit dengan tangan.
|
||||
-->
|
||||
|
||||
# My Webapp untuk YunoHost
|
||||
|
||||
[](https://ci-apps.yunohost.org/ci/apps/my_webapp/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=my_webapp)
|
||||
|
||||
*[Baca README ini dengan bahasa yang lain.](./ALL_README.md)*
|
||||
|
||||
> *Paket ini memperbolehkan Anda untuk memasang My Webapp secara cepat dan mudah pada server YunoHost.*
|
||||
> *Bila Anda tidak mempunyai YunoHost, silakan berkonsultasi dengan [panduan](https://yunohost.org/install) untuk mempelajari bagaimana untuk memasangnya.*
|
||||
|
||||
## Ringkasan
|
||||
|
||||
This application allows you to easily install a custom Web application, providing files access with [SFTP](https://yunohost.org/en/filezilla).
|
||||
|
||||
It can also create a MySQL or PostgreSQL database - which will be backed up and restored with your application. The connection details will be stored in the file `db_access.txt` located in the root directory.
|
||||
|
||||
PHP-FPM version can also be selected among `none`, `7.4`, `8.0`, `8.1` and `8.2`.
|
||||
|
||||
**Once installed, go to the chosen URL to know the user, domain and port you will have to use for the SFTP access.** The password is one you chosen during the installation. Under the Web directory, you will see a `www` folder which contains the public files served by this app. You can put all the files of your custom Web application inside.
|
||||
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an `error` folder in the `www` root directory, containing your custom `html` files.
|
||||
|
||||
|
||||
**Versi terkirim:** 1.0~ynh19
|
||||
## Dokumentasi dan sumber daya
|
||||
|
||||
- Depot kode aplikasi hulu: <https://github.com/YunoHost-Apps/my_webapp_ynh>
|
||||
- Gudang YunoHost: <https://apps.yunohost.org/app/my_webapp>
|
||||
- Laporkan bug: <https://github.com/YunoHost-Apps/my_webapp_ynh/issues>
|
||||
|
||||
## Info developer
|
||||
|
||||
Silakan kirim pull request ke [`testing` branch](https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing).
|
||||
|
||||
Untuk mencoba branch `testing`, silakan dilanjutkan seperti:
|
||||
|
||||
```bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
atau
|
||||
sudo yunohost app upgrade my_webapp -u https://github.com/YunoHost-Apps/my_webapp_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Info lebih lanjut mengenai pemaketan aplikasi:** <https://yunohost.org/packaging_apps>
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
# YunoHost 上的 My Webapp
|
||||
|
||||
[](https://dash.yunohost.org/appci/app/my_webapp)  
|
||||
[](https://ci-apps.yunohost.org/ci/apps/my_webapp/)  
|
||||
|
||||
[](https://install-app.yunohost.org/?app=my_webapp)
|
||||
|
||||
|
@ -24,9 +24,10 @@ PHP-FPM version can also be selected among `none`, `7.4`, `8.0`, `8.1` and `8.2`
|
|||
|
||||
**Once installed, go to the chosen URL to know the user, domain and port you will have to use for the SFTP access.** The password is one you chosen during the installation. Under the Web directory, you will see a `www` folder which contains the public files served by this app. You can put all the files of your custom Web application inside.
|
||||
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an`error` folder in the `www` root directory, containing your custom `html` files.
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an `error` folder in the `www` root directory, containing your custom `html` files.
|
||||
|
||||
**分发版本:** 1.0~ynh17
|
||||
|
||||
**分发版本:** 1.0~ynh19
|
||||
## 文档与资源
|
||||
|
||||
- 上游应用代码库: <https://github.com/YunoHost-Apps/my_webapp_ynh>
|
||||
|
|
|
@ -4,19 +4,23 @@ version = "1.0"
|
|||
name = "My Webapp configuration"
|
||||
|
||||
[main.sftp]
|
||||
name = "SFTP access"
|
||||
name.en = "SFTP access"
|
||||
name.fr = "Accès SFTP"
|
||||
|
||||
[main.sftp.with_sftp]
|
||||
ask = "Do you need a SFTP access?"
|
||||
ask.en = "Do you need a SFTP access?"
|
||||
ask.fr = "Avez-vous besoin d'un accès SFTP ?"
|
||||
type = "boolean"
|
||||
default = true
|
||||
|
||||
[main.sftp.password]
|
||||
ask = "Set a password for the SFTP access"
|
||||
ask.en = "Set a password for the SFTP access"
|
||||
ask.fr = "Définir un mot de passe pour l’accès SFTP"
|
||||
type = "password"
|
||||
optional = true
|
||||
visible = "with_sftp"
|
||||
help = "If a password already exist, leave blank and it will not be replaced."
|
||||
help.en = "If a password already exist, leave blank and it will not be replaced."
|
||||
help.fr = "Si un mot de passe existe déjà, laissez vide et il ne sera pas remplacé."
|
||||
|
||||
[main.code_error]
|
||||
name = "Html Custom error"
|
||||
|
|
|
@ -6,4 +6,4 @@ PHP-FPM version can also be selected among `none`, `7.4`, `8.0`, `8.1` and `8.2`
|
|||
|
||||
**Once installed, go to the chosen URL to know the user, domain and port you will have to use for the SFTP access.** The password is one you chosen during the installation. Under the Web directory, you will see a `www` folder which contains the public files served by this app. You can put all the files of your custom Web application inside.
|
||||
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an`error` folder in the `www` root directory, containing your custom `html` files.
|
||||
You can also customize 404 errors - if you enable the option in the config panel. Simply create an `error` folder in the `www` root directory, containing your custom `html` files.
|
||||
|
|
|
@ -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~ynh17"
|
||||
version = "1.0~ynh19"
|
||||
|
||||
maintainers = []
|
||||
|
||||
|
@ -59,6 +59,12 @@ ram.runtime = "50M"
|
|||
choices = [ "none", "mysql", "postgresql" ]
|
||||
default = "none"
|
||||
|
||||
[install.custom_error_file]
|
||||
ask = "Activate the custom error file use"
|
||||
type = "boolean"
|
||||
default = false
|
||||
help = "Once custom error enabled, you can add/create a custom `404.html` file in a directory `www/error`."
|
||||
|
||||
[resources]
|
||||
[resources.system_user]
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ then
|
|||
ynh_print_info --message="Backing up the database..."
|
||||
|
||||
if [ $database == "mysql" ]; then
|
||||
ynh_mysql_dump_db --database="$db_name" > db.sql*
|
||||
ynh_mysql_dump_db --database="$db_name" > db.sql
|
||||
elif [ $database == "postgresql" ]; then
|
||||
ynh_psql_dump_db --database="$db_name" > db.sql
|
||||
fi
|
||||
|
|
|
@ -44,7 +44,6 @@ nginx_extra_conf_dir=/etc/nginx/conf.d/$old_domain.d/$app.d
|
|||
|
||||
# Change the path in the NGINX config file
|
||||
if [ $change_path -eq 1 ]
|
||||
ynh_print_info --message="Change the path in the Nginx config file"
|
||||
then
|
||||
# Make a backup of the original NGINX config file if modified
|
||||
ynh_backup_if_checksum_is_different --file="$nginx_conf_path"
|
||||
|
@ -59,7 +58,7 @@ then
|
|||
ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf"
|
||||
fi
|
||||
|
||||
# Create a dedicated NGINX configssh
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
fi
|
||||
|
||||
|
@ -69,7 +68,7 @@ then
|
|||
# Delete file checksum for the old conf file location
|
||||
ynh_delete_file_checksum --file="$nginx_conf_path"
|
||||
ynh_delete_file_checksum --file="$nginx_extra_conf_dir/php.conf"
|
||||
#ynh_delete_file_checksum --file="$nginx_extra_conf_dir/nginx-code-error.conf"
|
||||
ynh_delete_file_checksum --file="$nginx_extra_conf_dir/error-code.conf"
|
||||
|
||||
path_url="$new_path"
|
||||
domain="$old_domain"
|
||||
|
@ -81,8 +80,14 @@ then
|
|||
mv $nginx_extra_conf_dir /etc/nginx/conf.d/$new_domain.d/$app.d
|
||||
|
||||
# Store file checksum for the new config file location
|
||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.d/php.conf"
|
||||
#ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.d/nginx-code-error.conf"
|
||||
if [ $phpversion != "none" ]
|
||||
then
|
||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.d/php.conf"
|
||||
fi
|
||||
if [ $custom_error_file -eq 1 ]
|
||||
then
|
||||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.d/error-code.conf"
|
||||
fi
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -59,7 +59,7 @@ get__free_footprint() {
|
|||
#=================================================
|
||||
|
||||
set__password() {
|
||||
if [ "$password" == "" ]
|
||||
if [ ! "$password" == "" ]
|
||||
then
|
||||
ynh_app_setting_set --app=$app --key=password --value="$password"
|
||||
fi
|
||||
|
@ -112,13 +112,21 @@ ynh_app_config_apply() {
|
|||
|
||||
if [ "${changed[phpversion]}" == "true" ]
|
||||
then
|
||||
ynh_app_setting_set --app=$app --key=phpversion --value="${old[phpversion]}"
|
||||
ynh_remove_fpm_config
|
||||
if [ "${old[phpversion]}" != "none" ]
|
||||
then
|
||||
ynh_app_setting_set --app=$app --key=phpversion --value="${old[phpversion]}"
|
||||
ynh_remove_fpm_config
|
||||
fi
|
||||
ynh_remove_app_dependencies
|
||||
YNH_PHP_VERSION=$phpversion
|
||||
# ^ ynh_add_config replaces __PHPVERSION__ by __PHP_YNH_VERSION__...
|
||||
ynh_app_setting_set --app=$app --key=phpversion --value="$phpversion"
|
||||
|
||||
database=$(ynh_app_setting_get --app=$app --key=database)
|
||||
dependencies="$(ynh_read_manifest -k "resources.apt.packages")"
|
||||
dependencies_from_raw_bash=$(eval "$(ynh_read_manifest -k "resources.apt.packages_from_raw_bash")" | tr "\n" " ")
|
||||
ynh_install_app_dependencies "$dependencies $dependencies_from_raw_bash"
|
||||
|
||||
nginx_extra_conf_dir="/etc/nginx/conf.d/$domain.d/$app.d"
|
||||
mkdir -p "$nginx_extra_conf_dir"
|
||||
if [ "$phpversion" == "none" ]
|
||||
|
@ -127,10 +135,6 @@ ynh_app_config_apply() {
|
|||
ynh_secure_remove --file="$nginx_extra_conf_dir/php.conf"
|
||||
else
|
||||
ynh_add_config --template="nginx-php.conf" --destination="$nginx_extra_conf_dir/php.conf"
|
||||
database=$(ynh_app_setting_get --app=$app --key=database)
|
||||
dependencies="$(ynh_read_manifest -k "resources.apt.packages")"
|
||||
dependencies_from_raw_bash=$(eval "$(ynh_read_manifest -k "resources.apt.packages_from_raw_bash")" | tr "\n" " ")
|
||||
ynh_install_app_dependencies "$dependencies $dependencies_from_raw_bash"
|
||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
|
||||
# ^ the helper takes care of ynh_app_setting_set the phpversion
|
||||
fi
|
||||
|
@ -150,27 +154,31 @@ ynh_app_config_apply() {
|
|||
then
|
||||
ynh_system_user_del_group --username=$app --groups="sftp.app"
|
||||
fi
|
||||
|
||||
if [ "${changed[password]}" == "true" ] && [ ! "$password" == "" ]
|
||||
then
|
||||
chpasswd <<< "${app}:${password}"
|
||||
fi
|
||||
|
||||
if [ "${changed[custom_error_file]}" == "true" ]
|
||||
then
|
||||
CUSTOM_ERROR_FILE=$custom_error_file
|
||||
nginx_extra_conf_dir="/etc/nginx/conf.d/$domain.d/$app.d"
|
||||
CUSTOM_ERROR_FILE=$custom_error_file
|
||||
nginx_extra_conf_dir="/etc/nginx/conf.d/$domain.d/$app.d"
|
||||
|
||||
if [ $custom_error_file -eq 1 ]
|
||||
then
|
||||
ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf"
|
||||
elif [ $custom_error_file -eq 0 ]
|
||||
then
|
||||
ynh_secure_remove --file="$nginx_extra_conf_dir/error-code.conf"
|
||||
fi
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
if [ $custom_error_file -eq 1 ]
|
||||
then
|
||||
ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf"
|
||||
elif [ $custom_error_file -eq 0 ]
|
||||
then
|
||||
ynh_secure_remove --file="$nginx_extra_conf_dir/error-code.conf"
|
||||
fi
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
fi
|
||||
|
||||
if [ "$phpversion" != "none" ]
|
||||
then
|
||||
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
ynh_app_config_run $1
|
||||
|
|
|
@ -67,9 +67,11 @@ then
|
|||
YNH_PHP_VERSION="$phpversion"
|
||||
fi
|
||||
|
||||
# Add the custom error build with the application
|
||||
ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf"
|
||||
ynh_app_setting_set --app=$app --key=custom_error_file --value="true"
|
||||
if [ $custom_error_file -eq 1 ]
|
||||
then
|
||||
# Add the custom error build with the application
|
||||
ynh_add_config --template="nginx-code-error.conf" --destination="$nginx_extra_conf_dir/error-code.conf"
|
||||
fi
|
||||
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
|
|
|
@ -14,7 +14,7 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.d/"
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.d"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
|
|
|
@ -70,7 +70,7 @@ fi
|
|||
|
||||
# If custom_error_file doesn't exist, create it.
|
||||
if [ -z "${custom_error_file:-}" ]; then
|
||||
custom_error_file=1
|
||||
custom_error_file=0
|
||||
ynh_app_setting_set --app=$app --key=custom_error_file --value=$custom_error_file
|
||||
fi
|
||||
|
||||
|
|
11
tests.toml
11
tests.toml
|
@ -7,6 +7,7 @@ test_format = 1.0
|
|||
# -------------------------------
|
||||
|
||||
args.with_sftp = "1"
|
||||
args.custom_error_file = "0"
|
||||
args.password = "SuperDuper_StrongPassw0rd"
|
||||
args.database = "none"
|
||||
args.phpversion = "8.3"
|
||||
|
@ -33,7 +34,6 @@ test_format = 1.0
|
|||
|
||||
[none_test]
|
||||
|
||||
only = ["install.subdir", "backup_restore", "upgrade" ]
|
||||
args.phpversion = "none"
|
||||
|
||||
[mysql_test]
|
||||
|
@ -50,3 +50,12 @@ test_format = 1.0
|
|||
|
||||
only = ["install.subdir", "backup_restore", "upgrade" ]
|
||||
args.database = "postgresql"
|
||||
|
||||
[custom_error_file_test]
|
||||
|
||||
args.custom_error_file = "1"
|
||||
test_upgrade_from.bf5d3ed.name = "1.0~ynh14"
|
||||
test_upgrade_from.bf5d3ed.args.with_mysql = "0"
|
||||
test_upgrade_from.bf5d3ed.args.domain = "sub.domain.tld"
|
||||
test_upgrade_from.bf5d3ed.args.path = "/"
|
||||
test_upgrade_from.bf5d3ed.args.password = "SuperDuper_StrongPassw0rd"
|
||||
|
|
Loading…
Add table
Reference in a new issue