From 4a5209e0b633e8684e7cbb8f572469d1abc1848b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 11 Nov 2020 22:58:22 +0100 Subject: [PATCH] Upgrade to PHP7.3 (#73) * Upgrade to PHP7.3 * rm -r -> ynh_secure_remove (#74) Co-authored-by: yalh76 Co-authored-by: Alexandre Aubin --- README.md | 10 ++++---- README_fr.md | 61 ++++++++++++++++++++++++++++++++++++++++++++++ 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 | 24 +++++++++--------- scripts/remove | 20 +++++++-------- scripts/restore | 17 +++++++------ scripts/upgrade | 26 +++++++++++--------- 14 files changed, 154 insertions(+), 68 deletions(-) create mode 100644 README_fr.md diff --git a/README.md b/README.md index 2259800..61815e9 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.* @@ -25,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 @@ -48,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 new file mode 100644 index 0000000..e5294d9 --- /dev/null +++ b/README_fr.md @@ -0,0 +1,61 @@ +# Jirafeau pour YunoHost + +[![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)* + +> *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 : https://yunohost.org/#/app_jirafeau_fr + +## Caractéristiques spécifiques YunoHost + +#### Architectures supportées + +* 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/) + +## 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 + +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 +``` 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..fc4bce4 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": ">= 4.0.0" }, "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..b4e5a99 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..19bde6f 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,9 +65,9 @@ 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 +# 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 +# Create a dedicated PHP-FPM config ynh_add_fpm_config +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,11 +134,12 @@ 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 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 @@ -154,7 +156,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 +169,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 +177,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..89783b5 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" @@ -63,12 +64,14 @@ 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" + +ynh_add_fpm_config #================================================= # 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 +100,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..0f5996e 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 @@ -106,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="$file" fi done <<< "$(find "$var_root/$type" -maxdepth 1 -mindepth 1 -type d)" # List all first level directories done @@ -115,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 @@ -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,9 +167,9 @@ 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 +# 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,11 +222,12 @@ 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 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 @@ -255,7 +257,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 +265,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