From a002d77be6692ca0508ad5423513ce7829b608fc Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 2 Apr 2020 19:26:02 +0200 Subject: [PATCH 01/13] Create README_fr.md --- README_fr.md | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 README_fr.md diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..463367f --- /dev/null +++ b/README_fr.md @@ -0,0 +1,64 @@ +# Jirafeau pour YunoHost + +[![Integration level](https://dash.yunohost.org/integration/jirafeau.svg)](https://dash.yunohost.org/appci/app/jirafeau) ![](https://ci-apps.yunohost.org/ci/badges/jirafeau.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/jirafeau.maintain.svg) +[![Install Jirafeau with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=jirafeau) + +*[Read this readme in english.](./README.md)* + +> *Ce package vous permet d'installer Jirafeau rapidement et simplement sur un serveur Yunohost. +Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* + +## Vue d'ensemble + +Jirafeau est un site web permettant d'héberger et de partager des fichiers de manière simple en leur donnant un lien unique. + +**Version incluse:** 4.1.1 + +## Captures d'écran + +![](http://i.imgur.com/TPjh48P.png) + +## Démo + +* [Démo officielle](https://demo.yunohost.org/jirafeau/) + +## Configuration + +## Documentation + + * Documentation officielle: + * Documentation YunoHost: Si une documentation spécifique est nécessaire, n'hésitez pas à contribuer. + +## Caractéristiques spécifiques YunoHost + +#### Architectures supportées + +* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jirafeau/) +* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/jirafeau/) + +## Limitations + +## Informations additionnelles + +## Liens + + * Signaler un bug: https://github.com/YunoHost-Apps/jirafeau_ynh/issues + * Site de l'application: https://gitlab.com/mojo42/Jirafeau + * Dépôt de l'application principale: https://gitlab.com/mojo42/Jirafeau + * Site web YunoHost: https://yunohost.org/ + +--- + +Informations pour les développeurs +---------------- + +**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.** +Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/jirafeau_ynh/tree/testing). + +Pour essayer la branche testing, procédez comme suit. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/jirafeau_ynh/tree/testing --debug +or +sudo yunohost app upgrade jirafeau -u https://github.com/YunoHost-Apps/jirafeau_ynh/tree/testing --debug +``` From c0b7d8ffa3c7ed7fd9009c37d905d8888e564c48 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 2 Apr 2020 19:27:54 +0200 Subject: [PATCH 02/13] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2259800..dcc0677 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ [![Integration level](https://dash.yunohost.org/integration/jirafeau.svg)](https://dash.yunohost.org/appci/app/jirafeau) ![](https://ci-apps.yunohost.org/ci/badges/jirafeau.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/jirafeau.maintain.svg) [![Install Jirafeau with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=jirafeau) +*[Lire ce readme en français.](./README_fr.md)* + > *This package allow you to install Jirafeau quickly and simply on a YunoHost server. If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* From 3f1b9b7eaccbc2255fa0d6a0fa94c3e6066bb0ef Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Thu, 2 Apr 2020 20:58:09 +0200 Subject: [PATCH 03/13] Update README_fr.md --- README_fr.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README_fr.md b/README_fr.md index 463367f..373410f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,7 +1,7 @@ # Jirafeau pour YunoHost -[![Integration level](https://dash.yunohost.org/integration/jirafeau.svg)](https://dash.yunohost.org/appci/app/jirafeau) ![](https://ci-apps.yunohost.org/ci/badges/jirafeau.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/jirafeau.maintain.svg) -[![Install Jirafeau with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=jirafeau) +[![Niveau d'intégration](https://dash.yunohost.org/integration/jirafeau.svg)](https://dash.yunohost.org/appci/app/jirafeau) ![](https://ci-apps.yunohost.org/ci/badges/jirafeau.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/jirafeau.maintain.svg) +[![Installer Jirafeau avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=jirafeau) *[Read this readme in english.](./README.md)* From 4ba242644e275bfcd3344d4b59c04e4c849bc404 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 10 Apr 2020 18:05:50 +0200 Subject: [PATCH 04/13] update README --- README.md | 8 -------- README_fr.md | 12 +----------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/README.md b/README.md index dcc0677..5e53e63 100644 --- a/README.md +++ b/README.md @@ -22,11 +22,8 @@ Jirafeau is a web site permitting to upload a file in a simple way and give an u * [YunoHost demo](https://demo.yunohost.org/jirafeau/) -## Configuration - ## Documentation - * Official documentation: * YunoHost documentation: If specific documentation is needed, feel free to contribute. ## YunoHost specific features @@ -35,11 +32,6 @@ Jirafeau is a web site permitting to upload a file in a simple way and give an u * x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jirafeau/) -* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/jirafeau/) - -## Limitations - -## Additional information ## Links diff --git a/README_fr.md b/README_fr.md index 373410f..95be1d0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,11 +22,8 @@ Jirafeau est un site web permettant d'héberger et de partager des fichiers de m * [Démo officielle](https://demo.yunohost.org/jirafeau/) -## Configuration - ## Documentation - * Documentation officielle: * Documentation YunoHost: Si une documentation spécifique est nécessaire, n'hésitez pas à contribuer. ## Caractéristiques spécifiques YunoHost @@ -35,11 +32,6 @@ Jirafeau est un site web permettant d'héberger et de partager des fichiers de m * x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jirafeau/) -* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/jirafeau/) - -## Limitations - -## Informations additionnelles ## Liens @@ -50,10 +42,8 @@ Jirafeau est un site web permettant d'héberger et de partager des fichiers de m --- -Informations pour les développeurs ----------------- +## Informations pour les développeurs -**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.** Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/jirafeau_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. From f088dc092c06404207aa9e94e512642edb2907be Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 10 Apr 2020 18:55:21 +0200 Subject: [PATCH 05/13] Revert "update README" This reverts commit 4ba242644e275bfcd3344d4b59c04e4c849bc404. --- README.md | 8 ++++++++ README_fr.md | 12 +++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e53e63..dcc0677 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,11 @@ Jirafeau is a web site permitting to upload a file in a simple way and give an u * [YunoHost demo](https://demo.yunohost.org/jirafeau/) +## Configuration + ## Documentation + * Official documentation: * YunoHost documentation: If specific documentation is needed, feel free to contribute. ## YunoHost specific features @@ -32,6 +35,11 @@ Jirafeau is a web site permitting to upload a file in a simple way and give an u * x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jirafeau/) +* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/jirafeau/) + +## Limitations + +## Additional information ## Links diff --git a/README_fr.md b/README_fr.md index 95be1d0..373410f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,8 +22,11 @@ Jirafeau est un site web permettant d'héberger et de partager des fichiers de m * [Démo officielle](https://demo.yunohost.org/jirafeau/) +## Configuration + ## Documentation + * Documentation officielle: * Documentation YunoHost: Si une documentation spécifique est nécessaire, n'hésitez pas à contribuer. ## Caractéristiques spécifiques YunoHost @@ -32,6 +35,11 @@ Jirafeau est un site web permettant d'héberger et de partager des fichiers de m * x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jirafeau/) +* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/jirafeau/) + +## Limitations + +## Informations additionnelles ## Liens @@ -42,8 +50,10 @@ Jirafeau est un site web permettant d'héberger et de partager des fichiers de m --- -## Informations pour les développeurs +Informations pour les développeurs +---------------- +**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.** Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/jirafeau_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. From 2c8d4d18f4c2ad0c160d93457ee38379ab8847dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 15 Oct 2020 09:07:23 +0200 Subject: [PATCH 06/13] Upgrade to PHP7.3 (#72) * Upgrade to PHP7.3 --- README.md | 8 +++----- README_fr.md | 23 ++++++++++------------- check_process | 1 + conf/cron | 4 ++-- conf/nginx.conf | 4 ++-- conf/php-fpm.conf | 2 +- manifest.json | 4 ++-- scripts/_common.sh | 18 ++++++++++++++++++ scripts/backup | 17 ++++++++--------- scripts/change_url | 14 +++++++------- scripts/install | 23 ++++++++++++----------- scripts/remove | 20 ++++++++++---------- scripts/restore | 13 +++++++------ scripts/upgrade | 19 ++++++++++--------- 14 files changed, 93 insertions(+), 77 deletions(-) diff --git a/README.md b/README.md index dcc0677..61815e9 100644 --- a/README.md +++ b/README.md @@ -27,15 +27,14 @@ Jirafeau is a web site permitting to upload a file in a simple way and give an u ## Documentation * Official documentation: - * YunoHost documentation: If specific documentation is needed, feel free to contribute. + * YunoHost documentation: https://yunohost.org/#/app_jirafeau ## YunoHost specific features #### Supported architectures -* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jirafeau/) -* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/jirafeau/) ## Limitations @@ -50,8 +49,7 @@ Jirafeau is a web site permitting to upload a file in a simple way and give an u --- -Developers info ----------------- +## Developers info Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/jirafeau_ynh/tree/testing). diff --git a/README_fr.md b/README_fr.md index 373410f..e5294d9 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,14 +5,14 @@ *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Jirafeau rapidement et simplement sur un serveur Yunohost. +> *Ce package vous permet d'installer Jirafeau rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* ## Vue d'ensemble Jirafeau est un site web permettant d'héberger et de partager des fichiers de manière simple en leur donnant un lien unique. -**Version incluse:** 4.1.1 +**Version incluse :** 4.1.1 ## Captures d'écran @@ -26,16 +26,15 @@ Jirafeau est un site web permettant d'héberger et de partager des fichiers de m ## Documentation - * Documentation officielle: - * Documentation YunoHost: Si une documentation spécifique est nécessaire, n'hésitez pas à contribuer. + * Documentation officielle : + * Documentation YunoHost : https://yunohost.org/#/app_jirafeau_fr ## Caractéristiques spécifiques YunoHost #### Architectures supportées -* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/jirafeau/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/jirafeau/) -* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/jirafeau%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/jirafeau/) ## Limitations @@ -43,17 +42,15 @@ Jirafeau est un site web permettant d'héberger et de partager des fichiers de m ## Liens - * Signaler un bug: https://github.com/YunoHost-Apps/jirafeau_ynh/issues - * Site de l'application: https://gitlab.com/mojo42/Jirafeau - * Dépôt de l'application principale: https://gitlab.com/mojo42/Jirafeau - * Site web YunoHost: https://yunohost.org/ + * Signaler un bug : https://github.com/YunoHost-Apps/jirafeau_ynh/issues + * Site de l'application : https://gitlab.com/mojo42/Jirafeau + * Dépôt de l'application principale : https://gitlab.com/mojo42/Jirafeau + * Site web YunoHost : https://yunohost.org/ --- -Informations pour les développeurs ----------------- +## Informations pour les développeurs -**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.** Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/jirafeau_ynh/tree/testing). Pour essayer la branche testing, procédez comme suit. diff --git a/check_process b/check_process index c67ae70..3ba88e3 100644 --- a/check_process +++ b/check_process @@ -28,3 +28,4 @@ Notification=none ; commit=48ed2dc5b80ed7f1ddd39a46917f993a8c4207d5 name=Refactoring and upgrade 3.3.0 manifest_arg=domain=DOMAIN&path=PATH&admin_user=USER&upload_password=supersecretpassword&is_public=1& + \ No newline at end of file diff --git a/conf/cron b/conf/cron index cb5bdea..450ac93 100644 --- a/conf/cron +++ b/conf/cron @@ -1,4 +1,4 @@ # https://gitlab.com/mojo42/Jirafeau/#how-can-i-automatize-the-cleaning-of-old-expired-files -12 3 * * * __APP__ php7.0 __FINALPATH__/admin.php clean_expired -16 3 * * * __APP__ php7.0 __FINALPATH__/admin.php clean_async +12 3 * * * __APP__ php__PHPVERSION__ __FINALPATH__/admin.php clean_expired +16 3 * * * __APP__ php__PHPVERSION__ __FINALPATH__/admin.php clean_async diff --git a/conf/nginx.conf b/conf/nginx.conf index edefb01..e5b517e 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -18,7 +18,7 @@ location __PATH__/ { location ~ ^__PATH__/lib/functions.js.php { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock; + fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; @@ -35,7 +35,7 @@ location __PATH__/ { location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock; + fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index b7b1cb5..c55828f 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -33,7 +33,7 @@ group = __USER__ ; (IPv6 and IPv4-mapped) on a specific port; ; '/path/to/unix/socket' - to listen on a unix socket. ; Note: This value is mandatory. -listen = /var/run/php/php7.0-fpm-__NAMETOCHANGE__.sock +listen = /var/run/php/php__PHPVERSION__-fpm-__NAMETOCHANGE__.sock ; Set listen(2) backlog. ; Default Value: 511 (-1 on FreeBSD and OpenBSD) diff --git a/manifest.json b/manifest.json index 11f0f9f..0dcfa3c 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Upload a file in a simple way and give a unique link to it", "fr": "Hébergez simplement un fichier et partagez-le avec un lien unique" }, - "version": "4.1.1~ynh1", + "version": "4.1.1~ynh2", "url": "https://gitlab.com/mojo42/Jirafeau", "license": "AGPL-3.0-only", "maintainer": { @@ -14,7 +14,7 @@ "email": "julien.malik@paraiso.me" }, "requirements": { - "yunohost": ">= 3.5.0" + "yunohost": ">= 3.8.1" }, "multi_instance": false, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index a9bf588..d7614e9 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1 +1,19 @@ #!/bin/bash + +#================================================= +# COMMON VARIABLES +#================================================= + +YNH_PHP_VERSION="7.3" + +#================================================= +# PERSONAL HELPERS +#================================================= + +#================================================= +# EXPERIMENTAL HELPERS +#================================================= + +#================================================= +# FUTURE OFFICIAL HELPERS +#================================================= diff --git a/scripts/backup b/scripts/backup index 007099f..d59c65f 100644 --- a/scripts/backup +++ b/scripts/backup @@ -17,47 +17,46 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." +ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= -# STANDARD BACKUP STEPS +# DECLARE DATA AND CONF FILES TO BACKUP +#================================================= +ynh_print_info --message="Declaring files to be backed up..." + #================================================= # BACKUP OF THE MAIN DIR OF THE APP #================================================= -ynh_script_progression --message="Backing up the main app directory..." ynh_backup --src_path="$final_path" #================================================= # BACKUP OF THE DATA DIR #================================================= -ynh_script_progression --message="Backing up data directory..." ynh_backup --src_path="/home/yunohost.app/$app" --is_big #================================================= # BACKUP OF THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Backing up nginx web server configuration..." ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # BACKUP OF THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Backing up php-fpm configuration..." -ynh_backup --src_path="/etc/php/7.0/fpm/pool.d/$app.conf" +ynh_backup --src_path="/etc/php//$phpversion/fpm/pool.d/$app.conf" #================================================= # BACKUP THE CRON FILE #================================================= -ynh_script_progression --message="Backing up the cron file..." ynh_backup --src_path="/etc/cron.d/$app" @@ -65,4 +64,4 @@ ynh_backup --src_path="/etc/cron.d/$app" # END OF SCRIPT #================================================= -ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last +ynh_print_info --message="Backup script completed for Jirafeau. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index 4e4774f..18f18ff 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -49,19 +49,19 @@ fi #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating nginx web server configuration..." --weight=2 +ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2 nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf -# Change the path in the nginx config file +# Change the path in the NGINX config file if [ $change_path -eq 1 ] then - # Make a backup of the original nginx config file if modified + # Make a backup of the original NGINX config file if modified ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for nginx helper + # Set global variables for NGINX helper domain="$old_domain" path_url="$new_path" - # Create a dedicated nginx config + # Create a dedicated NGINX config ynh_add_nginx_config fi @@ -87,7 +87,7 @@ ynh_replace_string --match_string="\$cfg['web_root'] = .*" --replace_string="\$c #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload @@ -95,4 +95,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" --last +ynh_script_progression --message="Change of URL completed for Jirafeau" --last diff --git a/scripts/install b/scripts/install index 93ab9b2..23d0d4f 100755 --- a/scripts/install +++ b/scripts/install @@ -33,7 +33,7 @@ app=$YNH_APP_INSTANCE_NAME #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_script_progression --message="Validating installation parameters..." +ynh_script_progression --message="Validating installation parameters..." --weight=1 final_path=/var/www/$app test ! -e "$final_path" || ynh_die "This path already contains a folder" @@ -44,7 +44,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." +ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url @@ -65,7 +65,7 @@ ynh_setup_source --dest_dir="$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." +ynh_script_progression --message="Configuring NGINX web server..." # Create a dedicated nginx config ynh_add_nginx_config @@ -81,10 +81,11 @@ ynh_system_user_create --username=$app #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring php-fpm..." --weight=2 +ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 -# Create a dedicated php-fpm config -ynh_add_fpm_config +# Create a dedicated PHP-FPM config +ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # SPECIFIC SETUP @@ -110,7 +111,7 @@ ynh_print_ON #================================================= # CONFIGURE JIRAFEAU #================================================= -ynh_script_progression --message="Configuring jirafeau..." +ynh_script_progression --message="Configuring Jirafeau..." --weight=2 var_root=/home/yunohost.app/$app @@ -133,7 +134,7 @@ ynh_secure_remove --file=$final_path/install.php #================================================= # SET THE CRON FILE #================================================= -ynh_script_progression --message="Configuring the cron file..." +ynh_script_progression --message="Configuring the cron file..." --weight=2 cp ../conf/cron /etc/cron.d/$app ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file=/etc/cron.d/$app @@ -154,7 +155,7 @@ chmod -R 700 $var_root #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." +ynh_script_progression --message="Configuring SSOwat..." --weight=2 ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" if [ $is_public -eq 0 ] @@ -167,7 +168,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload @@ -175,4 +176,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last +ynh_script_progression --message="Installation of Jirafeau completed" --last diff --git a/scripts/remove b/scripts/remove index 29aed30..9e6c2bc 100755 --- a/scripts/remove +++ b/scripts/remove @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." +ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME @@ -24,7 +24,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # REMOVE THE MAIN DIR OF THE APP #================================================= -ynh_script_progression --message="Removing app main directory..." +ynh_script_progression --message="Removing Jirafeau main directory..." --weight=2 # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -32,23 +32,23 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration..." +ynh_script_progression --message="Removing NGINX web server configuration..." --weight=2 -# Remove the dedicated nginx config +# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= # REMOVE THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Removing php-fpm configuration..." --weight=2 +ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=2 -# Remove the dedicated php-fpm config +# Remove the dedicated PHP-FPM config ynh_remove_fpm_config #================================================= # REMOVE THE CRON FILE #================================================= -ynh_script_progression --message="Removing the cron file..." +ynh_script_progression --message="Removing the cron file..." --weight=1 ynh_secure_remove --file="/etc/cron.d/$app" @@ -57,7 +57,7 @@ ynh_secure_remove --file="/etc/cron.d/$app" #================================================= # REMOVE THE DATA DIRECTORY #================================================= -ynh_script_progression --message="Removing data directory..." +ynh_script_progression --message="Removing data directory..." --weight=1 ynh_secure_remove --file="/home/yunohost.app/$app" @@ -66,7 +66,7 @@ ynh_secure_remove --file="/home/yunohost.app/$app" #================================================= # REMOVE DEDICATED USER #================================================= -ynh_script_progression --message="Removing the dedicated system user..." +ynh_script_progression --message="Removing the dedicated system user..." --weight=2 # Delete a system user ynh_system_user_delete --username=$app @@ -75,4 +75,4 @@ ynh_system_user_delete --username=$app # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --last +ynh_script_progression --message="Removal of Jirafeau completed" --last diff --git a/scripts/restore b/scripts/restore index fde181b..f2f7cba 100644 --- a/scripts/restore +++ b/scripts/restore @@ -25,11 +25,12 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= -ynh_script_progression --message="Validating restoration parameters..." +ynh_script_progression --message="Validating restoration parameters..." --weight=1 ynh_webpath_available --domain=$domain --path_url=$path_url \ || ynh_die --message="Path not available: ${domain}${path_url}" @@ -47,7 +48,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." +ynh_script_progression --message="Restoring Jirafeau main directory..." --weight=2 ynh_restore_file --origin_path="$final_path" @@ -68,7 +69,7 @@ ynh_restore_file --origin_path="/etc/php/7.0/fpm/pool.d/$app.conf" #================================================= # RESTORE THE CRON FILE #================================================= -ynh_script_progression --message="Restoring the cron file..." +ynh_script_progression --message="Restoring the cron file..." --weight=1 ynh_restore_file --origin_path="/etc/cron.d/$app" @@ -97,13 +98,13 @@ chown -R $app:root /home/yunohost.app/$app #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_script_progression --message="Reloading nginx web server and php-fpm..." +ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=2 -ynh_systemd_action --service_name=php7.0-fpm --action=reload +ynh_systemd_action --service_name=php$phpversion-fpm --action=reload ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --last +ynh_script_progression --message="Restoration completed for Jirafeau" --last diff --git a/scripts/upgrade b/scripts/upgrade index 533633a..bd3a365 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -24,6 +24,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) ynh_print_OFF upload_password=$(ynh_app_setting_get --app=$app --key=upload_password) ynh_print_ON +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK VERSION @@ -34,7 +35,7 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_script_progression --message="Ensuring downward compatibility..." +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # Fix is_public as a boolean value if [ "$is_public" = "Yes" ]; then @@ -150,15 +151,15 @@ fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=2 +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=2 -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config #================================================= # CREATE DEDICATED USER #================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." +ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 # Create a dedicated user (if not existing) ynh_system_user_create --username=$app @@ -166,7 +167,7 @@ ynh_system_user_create --username=$app #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading php-fpm configuration..." --weight=2 +ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated php-fpm config ynh_add_fpm_config @@ -198,7 +199,7 @@ ynh_print_ON #================================================= # CONFIGURE JIRAFEAU #================================================= -ynh_script_progression --message="Upgrading jirafeau configuration..." +ynh_script_progression --message="Upgrading Jirafeau configuration..." --weight=2 var_root=/home/yunohost.app/$app @@ -221,7 +222,7 @@ ynh_secure_remove --file=$final_path/install.php #================================================= # SET THE CRON FILE #================================================= -ynh_script_progression --message="Configuring the cron file..." +ynh_script_progression --message="Configuring the cron file..." --weight=1 cp ../conf/cron /etc/cron.d/$app ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file=/etc/cron.d/$app @@ -255,7 +256,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 ynh_systemd_action --service_name=nginx --action=reload @@ -263,4 +264,4 @@ ynh_systemd_action --service_name=nginx --action=reload # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" --last +ynh_script_progression --message="Upgrade of Jirafeau completed" --last From 0f0d0da0c09cdcf60dbbdd9fb2f3c815433ca921 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 18 Oct 2020 19:28:13 +0200 Subject: [PATCH 07/13] Add PHP version to cron --- scripts/install | 1 + scripts/restore | 2 +- scripts/upgrade | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 23d0d4f..f4962a5 100755 --- a/scripts/install +++ b/scripts/install @@ -139,6 +139,7 @@ ynh_script_progression --message="Configuring the cron file..." --weight=2 cp ../conf/cron /etc/cron.d/$app ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file=/etc/cron.d/$app ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file=/etc/cron.d/$app +ynh_replace_string --match_string="__PHPVERSION__" --replace_string=$phpversion --target_file=/etc/cron.d/$app #================================================= # GENERIC FINALISATION diff --git a/scripts/restore b/scripts/restore index f2f7cba..f6b3e16 100644 --- a/scripts/restore +++ b/scripts/restore @@ -64,7 +64,7 @@ ynh_system_user_create --username=$app # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_restore_file --origin_path="/etc/php/7.0/fpm/pool.d/$app.conf" +ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= # RESTORE THE CRON FILE diff --git a/scripts/upgrade b/scripts/upgrade index bd3a365..b45c265 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -227,6 +227,7 @@ ynh_script_progression --message="Configuring the cron file..." --weight=1 cp ../conf/cron /etc/cron.d/$app ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file=/etc/cron.d/$app ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file=/etc/cron.d/$app +ynh_replace_string --match_string="__PHPVERSION__" --replace_string=$phpversion --target_file=/etc/cron.d/$app #================================================= # GENERIC FINALISATION From e8af60f5a6dc751c3a3771e2d24142bdec372373 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 18 Oct 2020 19:34:39 +0200 Subject: [PATCH 08/13] Small typos --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index b45c265..b51a367 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -116,7 +116,7 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=3 +ynh_script_progression --message="Backing up Jirafeau before upgrading (may take a while)..." --weight=3 # Backup the current version of the app ynh_backup_before_upgrade @@ -169,7 +169,7 @@ ynh_system_user_create --username=$app #================================================= ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 -# Create a dedicated php-fpm config +# Create a dedicated PHP-FPM config ynh_add_fpm_config #================================================= From 045aaec61fc5c08a622172d6e5a7c533f20b1db2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 6 Nov 2020 14:51:12 +0100 Subject: [PATCH 09/13] Update scripts/restore Co-authored-by: yalh76 --- scripts/restore | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/restore b/scripts/restore index f6b3e16..74aac70 100644 --- a/scripts/restore +++ b/scripts/restore @@ -66,6 +66,7 @@ ynh_system_user_create --username=$app ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION #================================================= # RESTORE THE CRON FILE #================================================= From 067c44465ffaa6b930f320586cf92e14311b1b40 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 9 Nov 2020 15:59:03 +0100 Subject: [PATCH 10/13] rm -r -> ynh_secure_remove (#74) --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index b51a367..ee4c1e2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -107,7 +107,7 @@ then # Delete the directory if it's only one character long if [ ${#dirname} -eq 1 ] then - rm -r "$file" + ynh_secure_remove "$file" fi done <<< "$(find "$var_root/$type" -maxdepth 1 -mindepth 1 -type d)" # List all first level directories done From d85edaa965e871d56af4381d8ab8972eda5d7207 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 9 Nov 2020 16:04:43 +0100 Subject: [PATCH 11/13] Fix typo --- manifest.json | 2 +- scripts/backup | 2 +- scripts/install | 4 ++-- scripts/restore | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index 0dcfa3c..fc4bce4 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "julien.malik@paraiso.me" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.0.0" }, "multi_instance": false, "services": [ diff --git a/scripts/backup b/scripts/backup index d59c65f..b4e5a99 100644 --- a/scripts/backup +++ b/scripts/backup @@ -52,7 +52,7 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" # BACKUP OF THE PHP-FPM CONFIGURATION #================================================= -ynh_backup --src_path="/etc/php//$phpversion/fpm/pool.d/$app.conf" +ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= # BACKUP THE CRON FILE diff --git a/scripts/install b/scripts/install index f4962a5..19bde6f 100755 --- a/scripts/install +++ b/scripts/install @@ -67,7 +67,7 @@ ynh_setup_source --dest_dir="$final_path" #================================================= ynh_script_progression --message="Configuring NGINX web server..." -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -84,7 +84,7 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION +ynh_add_fpm_config phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= diff --git a/scripts/restore b/scripts/restore index 74aac70..89783b5 100644 --- a/scripts/restore +++ b/scripts/restore @@ -66,7 +66,8 @@ ynh_system_user_create --username=$app ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION +ynh_add_fpm_config + #================================================= # RESTORE THE CRON FILE #================================================= From 157fa25057fca6d2c4350c76d3bf691ffb162c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 10 Nov 2020 20:47:22 +0100 Subject: [PATCH 12/13] Update scripts/upgrade Co-authored-by: yalh76 --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index ee4c1e2..0f5996e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -107,7 +107,7 @@ then # Delete the directory if it's only one character long if [ ${#dirname} -eq 1 ] then - ynh_secure_remove "$file" + ynh_secure_remove --file="$file" fi done <<< "$(find "$var_root/$type" -maxdepth 1 -mindepth 1 -type d)" # List all first level directories done From 268086b8544e971df47fd9aa77e4a44ecf54b70c Mon Sep 17 00:00:00 2001 From: Kay0u Date: Wed, 25 Nov 2020 12:37:08 +0100 Subject: [PATCH 13/13] Fix admin panel after upgrade --- manifest.json | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index fc4bce4..4cfacff 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Upload a file in a simple way and give a unique link to it", "fr": "Hébergez simplement un fichier et partagez-le avec un lien unique" }, - "version": "4.1.1~ynh2", + "version": "4.1.1~ynh3", "url": "https://gitlab.com/mojo42/Jirafeau", "license": "AGPL-3.0-only", "maintainer": { diff --git a/scripts/upgrade b/scripts/upgrade index 0f5996e..360e2ab 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,7 +18,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) -admin_user=$(ynh_app_setting_get --app=$app --key=admin_user) +admin_user=$(ynh_app_setting_get --app=$app --key=admin) is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) ynh_print_OFF