From 136879170ba2b60825579d8825564caf3ddb1809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Nordh=C3=B8y?= Date: Tue, 28 Jan 2020 06:30:10 +0100 Subject: [PATCH 01/47] example_ynh readme reworked --- README.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index c4bc9db..e1fe556 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # Usage of this package (REMOVE THIS SECTION BEFORE RELEASE) - Copy this app before working on it. -- Edit `conf/nginx.conf` file to match application prerequisites. -- Edit `manifest.json` with application specific information. +- Edit the `conf/nginx.conf` file to match app prerequisites. +- Edit the `manifest.json` with app specific info. - Edit the `install`, `upgrade`, `remove`, `backup`, and `restore` scripts. - Using the [script helpers documentation.](https://helpers.yunohost.org/) - Add a `LICENSE` file for the package. -- Edit `README.md` and README_fr.md. +- Edit `README.md` and `README_fr.md`. # Example app for YunoHost @@ -14,8 +14,8 @@ *[Lire ce readme en français.](./README_fr.md)* -> *This package allow you to install REPLACEBYYOURAPP 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.* +> *This package allows you to install REPLACEBYYOURAPP quickly and simply on a YunoHost server. +If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview Quick description of this app. @@ -24,15 +24,15 @@ Quick description of this app. ## Screenshots -![](Link to an screenshot for this app) +![](Link to a screenshot of this app.) ## Demo -* [Official demo](Link to a demo site for this app) +* [Official demo](Link to a demo site for this app.) ## Configuration -How to configure this app: by an admin panel, a plain file with SSH, or any other way. +How to configure this app: From an admin panel, a plain file with SSH, or any other way. ## Documentation @@ -41,14 +41,14 @@ How to configure this app: by an admin panel, a plain file with SSH, or any othe ## YunoHost specific features -#### Multi-users support +#### Multi-user support Are LDAP and HTTP auth supported? Can the app be used by multiple users? #### Supported architectures -* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/REPLACEBYYOURAPP/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/REPLACEBYYOURAPP/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/REPLACEBYYOURAPP/) ## Limitations @@ -57,25 +57,25 @@ Can the app be used by multiple users? ## Additional information -* Other information you would add about this application +* Other info you would like to add about this app. -**More information on the documentation page:** +**More info on the documentation page:** https://yunohost.org/packaging_apps ## Links * Report a bug: https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/issues - * App website: Link to the official website of this app - * Upstream app repository: Link to the official repository of the upstream app + * App website: Link to the official website of this app. + * Upstream app repository: Link to the official repository of the upstream app. * YunoHost website: https://yunohost.org/ --- -Developers info +Developer info ---------------- **Only if you want to use a testing branch for coding, instead of merging directly into master.** -Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing). +Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing). To try the testing branch, please proceed like that. ``` From b3755ebdee2342cd90b97d6c41c4012b45c67685 Mon Sep 17 00:00:00 2001 From: maniack Date: Sat, 8 Feb 2020 12:39:48 +0100 Subject: [PATCH 02/47] Set the default php version to use --- conf/nginx.conf | 2 +- conf/php-fpm.conf | 2 +- scripts/_common.sh | 2 +- scripts/backup | 3 ++- scripts/install | 4 +++- scripts/restore | 5 +++-- scripts/upgrade | 9 ++++++++- 7 files changed, 19 insertions(+), 8 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index f2277ea..37de41d 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -18,7 +18,7 @@ location __PATH__/ { try_files $uri $uri/ index.php; 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; diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index ab5dca9..ab1a471 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/scripts/_common.sh b/scripts/_common.sh index 8bb05b4..7e55ac0 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="deb1 deb2" +pkg_dependencies="deb1 deb2 php$YNH_DEFAULT_PHP_VERSION-deb1 php$YNH_DEFAULT_PHP_VERSION-deb2" #================================================= # PERSONAL HELPERS diff --git a/scripts/backup b/scripts/backup index d985aba..2f1b4b1 100755 --- a/scripts/backup +++ b/scripts/backup @@ -31,6 +31,7 @@ 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) db_name=$(ynh_app_setting_get --app=$app --key=db_name) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # STANDARD BACKUP STEPS @@ -60,7 +61,7 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= ynh_script_progression --message="Backing up php-fpm configuration..." --time --weight=1 -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 MYSQL DATABASE diff --git a/scripts/install b/scripts/install index 4cbacc8..e03a016 100755 --- a/scripts/install +++ b/scripts/install @@ -75,6 +75,8 @@ ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=is_public --value=$is_public ynh_app_setting_set --app=$app --key=language --value=$language +ynh_app_setting_set --app=$app --key=phpversion --value=$YNH_DEFAULT_PHP_VERSION + #================================================= # STANDARD MODIFICATIONS #================================================= @@ -153,7 +155,7 @@ ynh_script_progression --message="Configuring nginx web server..." --time --weig ### `ynh_add_nginx_config` will use the file conf/nginx.conf # Create a dedicated nginx config -ynh_add_nginx_config +ynh_add_nginx_config php_version #================================================= # CREATE DEDICATED USER diff --git a/scripts/restore b/scripts/restore index a153a70..ab43d71 100755 --- a/scripts/restore +++ b/scripts/restore @@ -33,6 +33,7 @@ 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) db_user=$db_name +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -78,7 +79,7 @@ chown -R root: $final_path # 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 FAIL2BAN CONFIGURATION @@ -148,7 +149,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= ynh_script_progression --message="Reloading nginx web server and php-fpm..." --time --weight=1 -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 #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 243e85b..cb647b3 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,6 +23,7 @@ is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) language=$(ynh_app_setting_get --app=$app --key=language) db_name=$(ynh_app_setting_get --app=$app --key=db_name) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK VERSION @@ -62,6 +63,12 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +# If phpversion doesn't exist, create it +if [ -z "$phpversion" ]; then + phpversion=$YNH_DEFAULT_PHP_VERSION + ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -115,7 +122,7 @@ fi ynh_script_progression --message="Upgrading nginx web server configuration..." --time --weight=1 # Create a dedicated nginx config -ynh_add_nginx_config +ynh_add_nginx_config php_version #================================================= # UPGRADE DEPENDENCIES From 426f0b2ddf29cf80abe51228ea4d4410106bb4f7 Mon Sep 17 00:00:00 2001 From: maniack Date: Sat, 8 Feb 2020 12:43:49 +0100 Subject: [PATCH 03/47] Move nginx after php --- scripts/upgrade | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index cb647b3..65727b4 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -116,14 +116,6 @@ then ynh_setup_source --dest_dir="$final_path" fi -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." --time --weight=1 - -# Create a dedicated nginx config -ynh_add_nginx_config php_version - #================================================= # UPGRADE DEPENDENCIES #================================================= @@ -147,6 +139,14 @@ ynh_script_progression --message="Upgrading php-fpm configuration..." --time --w # Create a dedicated php-fpm config ynh_add_fpm_config +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading nginx web server configuration..." --time --weight=1 + +# Create a dedicated nginx config +ynh_add_nginx_config php_version + #================================================= # SPECIFIC UPGRADE #================================================= From bcab74253f1042262a2a00a577ad1cffeee8af72 Mon Sep 17 00:00:00 2001 From: maniack Date: Sun, 9 Feb 2020 18:27:35 +0100 Subject: [PATCH 04/47] Adapt the code accordingly to https://github.com/YunoHost/yunohost/pull/879 --- scripts/install | 4 +--- scripts/upgrade | 23 ++++++++--------------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/scripts/install b/scripts/install index e03a016..4cbacc8 100755 --- a/scripts/install +++ b/scripts/install @@ -75,8 +75,6 @@ ynh_app_setting_set --app=$app --key=admin --value=$admin ynh_app_setting_set --app=$app --key=is_public --value=$is_public ynh_app_setting_set --app=$app --key=language --value=$language -ynh_app_setting_set --app=$app --key=phpversion --value=$YNH_DEFAULT_PHP_VERSION - #================================================= # STANDARD MODIFICATIONS #================================================= @@ -155,7 +153,7 @@ ynh_script_progression --message="Configuring nginx web server..." --time --weig ### `ynh_add_nginx_config` will use the file conf/nginx.conf # Create a dedicated nginx config -ynh_add_nginx_config php_version +ynh_add_nginx_config #================================================= # CREATE DEDICATED USER diff --git a/scripts/upgrade b/scripts/upgrade index 65727b4..ef79017 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,7 +23,6 @@ is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) language=$(ynh_app_setting_get --app=$app --key=language) db_name=$(ynh_app_setting_get --app=$app --key=db_name) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # CHECK VERSION @@ -63,12 +62,6 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi -# If phpversion doesn't exist, create it -if [ -z "$phpversion" ]; then - phpversion=$YNH_DEFAULT_PHP_VERSION - ynh_app_setting_set --app=$app --key=phpversion --value=$phpversion -fi - #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -123,6 +116,14 @@ ynh_script_progression --message="Upgrading dependencies..." --time --weight=1 ynh_install_app_dependencies $pkg_dependencies +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading nginx web server configuration..." --time --weight=1 + +# Create a dedicated nginx config +ynh_add_nginx_config + #================================================= # CREATE DEDICATED USER #================================================= @@ -139,14 +140,6 @@ ynh_script_progression --message="Upgrading php-fpm configuration..." --time --w # Create a dedicated php-fpm config ynh_add_fpm_config -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." --time --weight=1 - -# Create a dedicated nginx config -ynh_add_nginx_config php_version - #================================================= # SPECIFIC UPGRADE #================================================= From ba90882b20dc182210acb296494cc5cfd9428896 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Sun, 9 Feb 2020 18:29:41 +0100 Subject: [PATCH 05/47] Update upgrade --- scripts/upgrade | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index ef79017..243e85b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -109,13 +109,6 @@ then ynh_setup_source --dest_dir="$final_path" fi -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --time --weight=1 - -ynh_install_app_dependencies $pkg_dependencies - #================================================= # NGINX CONFIGURATION #================================================= @@ -124,6 +117,13 @@ ynh_script_progression --message="Upgrading nginx web server configuration..." - # Create a dedicated nginx config ynh_add_nginx_config +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --time --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # CREATE DEDICATED USER #================================================= From 476edda0ce84df37efb1290c542b16c797c92f78 Mon Sep 17 00:00:00 2001 From: Alexandre Morignot Date: Sat, 25 Apr 2020 14:19:54 +0200 Subject: [PATCH 06/47] Fix helpers link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c4bc9db..bf01dc4 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ - Edit `conf/nginx.conf` file to match application prerequisites. - Edit `manifest.json` with application specific information. - Edit the `install`, `upgrade`, `remove`, `backup`, and `restore` scripts. - - Using the [script helpers documentation.](https://helpers.yunohost.org/) + - Using the [script helpers documentation.](https://yunohost.org/#/packaging_apps_helpers) - Add a `LICENSE` file for the package. - Edit `README.md` and README_fr.md. From c5fa52df5e4f9c7d782d56ff997c9abd6332d5aa Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 7 May 2020 02:10:08 +0200 Subject: [PATCH 07/47] Improve comments about extra flags for service add --- scripts/install | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index 4cbacc8..0cf85ae 100755 --- a/scripts/install +++ b/scripts/install @@ -301,13 +301,22 @@ ynh_use_logrotate yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log" -### With YunoHost 3.8 you will then be able to: -### - specify a list of ports that needs to be publicly exposed (c.f. --needs_exposed_ports) -### which will then be checked by YunoHost's diagnosis system -### - specify a custom command to check the status of the service (c.f. --test_status) -### though it's only needed for weird cases where 'systemctl status' doesn't do a good job -### - specify a custom command to check / validate the configuration of the service (c.f. --test_conf) -### for example, the command to check the configuration of nginx is "nginx -t" +### Additional options starting with 3.8: +### +### --needs_exposed_ports "$port" a list of ports that needs to be publicly exposed +### which will then be checked by YunoHost's diagnosis system +### (N.B. DO NOT USE THIS is the port is only internal !!!) +### +### --test_status "some command" a custom command to check the status of the service +### (only relevant if 'systemctl status' doesn't do a good job) +### +### --test_conf "some command" some command similar to "nginx -t" that validates the conf of the service +### +### Re-calling 'yunohost service add' during the upgrade script is the right way +### to proceed if you later realize that you need to enable some flags that +### weren't enabled on old installs (be careful it'll override the existing +### service though so you should re-provide all relevant flags when doing so) +### #================================================= # START SYSTEMD SERVICE From 51525a41dd2a1468c99a046ed4248cedf4504fb4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 7 May 2020 02:13:54 +0200 Subject: [PATCH 08/47] It shouldn't be the default to start/stop service during backup declarations.. --- scripts/backup | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/scripts/backup b/scripts/backup index d985aba..7af1586 100755 --- a/scripts/backup +++ b/scripts/backup @@ -35,11 +35,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) #================================================= # STANDARD BACKUP STEPS #================================================= -# STOP SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Stopping a systemd service..." --time --weight=1 - -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" #================================================= # BACKUP THE APP MAIN DIR @@ -99,13 +94,6 @@ ynh_backup --src_path="/etc/systemd/system/$app.service" ynh_backup --src_path="/etc/cron.d/$app" -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Starting a systemd service..." --time --weight=1 - -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" - #================================================= # END OF SCRIPT #================================================= From 961694bbf55de22e55807e75c4ea5570ef3dbac1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 7 May 2020 02:23:17 +0200 Subject: [PATCH 09/47] Add explanation about ynh_backup, remove progress bars and move mysqldump to the end --- scripts/backup | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/scripts/backup b/scripts/backup index 7af1586..5c78747 100755 --- a/scripts/backup +++ b/scripts/backup @@ -24,7 +24,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --time --weight=1 +ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -33,41 +33,37 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) db_name=$(ynh_app_setting_get --app=$app --key=db_name) #================================================= -# STANDARD BACKUP STEPS +# DECLARE DATA AND CONF FILES TO BACKUP #================================================= +ynh_print_info --message="Declaring files to be backuped..." + +# N.B. : the following 'ynh_backup' calls are only a *declaration* of what needs +# to be backuped and not an actual copy of any file. The actual backup that +# creates and fill the archive with the files happens in the core after this +# script is called. Hence ynh_backups calls takes basically 0 seconds to run. + #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_script_progression --message="Backing up the main app directory..." --time --weight=1 ynh_backup --src_path="$final_path" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Backing up nginx web server configuration..." --time --weight=1 ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # BACKUP THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Backing up php-fpm configuration..." --time --weight=1 ynh_backup --src_path="/etc/php/7.0/fpm/pool.d/$app.conf" -#================================================= -# BACKUP THE MYSQL DATABASE -#================================================= -ynh_script_progression --message="Backing up the MySQL database..." --time --weight=1 - -ynh_mysql_dump_db --database="$db_name" > db.sql - #================================================= # BACKUP FAIL2BAN CONFIGURATION #================================================= -ynh_script_progression --message="Backing up fail2ban configuration..." --time --weight=1 ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf" ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" @@ -77,14 +73,12 @@ ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" #================================================= # BACKUP LOGROTATE #================================================= -ynh_script_progression --message="Backing up logrotate configuration..." --time --weight=1 ynh_backup --src_path="/etc/logrotate.d/$app" #================================================= # BACKUP SYSTEMD #================================================= -ynh_script_progression --message="Backing up systemd configuration..." --time --weight=1 ynh_backup --src_path="/etc/systemd/system/$app.service" @@ -94,8 +88,19 @@ ynh_backup --src_path="/etc/systemd/system/$app.service" ynh_backup --src_path="/etc/cron.d/$app" +#================================================= +# BACKUP THE MYSQL DATABASE +#================================================= + +ynh_print_info --message="Backing up the database..." + +# (However, things like mysql dumps *do* take some time to run, though the +# copy of the generated dump to the archive still happens later) + +ynh_mysql_dump_db --database="$db_name" > db.sql + #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --time --last +ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --time --last From d8cff1c3cac195b0ae47b5eaae73d345a4f298f8 Mon Sep 17 00:00:00 2001 From: "ljf (zamentur)" Date: Thu, 7 May 2020 19:34:39 +0200 Subject: [PATCH 10/47] [fix] Unused option --- scripts/backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index 5c78747..e33ae61 100755 --- a/scripts/backup +++ b/scripts/backup @@ -103,4 +103,4 @@ ynh_mysql_dump_db --database="$db_name" > db.sql # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --time --last +ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." From b6681dc7657058ec4aa94792493ca87752f3110c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 12 Aug 2019 23:06:33 +0200 Subject: [PATCH 11/47] Create issue_template.md --- issue_template.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 issue_template.md diff --git a/issue_template.md b/issue_template.md new file mode 100644 index 0000000..cbe4272 --- /dev/null +++ b/issue_template.md @@ -0,0 +1,45 @@ +--- +name: Bug report +about: Create a report to help us debug + +--- + +**How to post a meaningful bug report** +1. *Read this whole template first.* +2. *Determine if you are on the right place:* + - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change url...), you are on the right place!* + - *Otherwise, the issue may be due to REPLACEBYYOURAPP itself. Refer to its documentation or repository for help.* + - *If you have a doubt, post here, we will figure it out together.* +3. *Delete the italic comments as you write over them below, and remove this guide.* +--- + +**Describe the bug** +*A clear and concise description of what the bug is.* + +**Versions** +- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* +- YunoHost version: x.x.x +- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* +- Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?: *no / yes* + - If yes, please explain: +- Package version/branch: *if you did not specify anything, put "latest"* + +**To Reproduce** +*Steps to reproduce the behavior.* +- *If you performed a command from the CLI, the command itself is enough. For example:* + ```sh + sudo yunohost app install REPLACEBYYOURAPP + ``` +- *If you used the webadmin, please perform the equivalent command from the CLI first.* +- *If the error occurs in your browser, explain what you did:* + 1. *Go to '...'* + 2. *Click on '....'* + 3. *Scroll down to '....'* + 4. *See error* + +**Expected behavior** +*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* + +**Logs** +*After a failed command, YunoHost makes the log available to you, but also to others, thanks to `yunohost log display [log name] --share`. The actual command, with the correct log name, is displayed at the end of the failed attempt in the CLI. Execute it and copy here the share link it outputs.* +*If applicable and useful, add screenshots to help explain your problem.* From d28a9bc4c0bd4e09ae810286c00b276882fadce1 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 22 Oct 2019 20:49:29 +0200 Subject: [PATCH 12/47] Update issue_template.md --- issue_template.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/issue_template.md b/issue_template.md index cbe4272..b40eb75 100644 --- a/issue_template.md +++ b/issue_template.md @@ -22,7 +22,8 @@ about: Create a report to help us debug - I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* - Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?: *no / yes* - If yes, please explain: -- Package version/branch: *if you did not specify anything, put "latest"* +- Using, or trying to install package version/branch: +- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* **To Reproduce** *Steps to reproduce the behavior.* From cb63c893eaac0094769a9cad19538725d968e1d8 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 24 Oct 2019 01:13:28 +0200 Subject: [PATCH 13/47] Adding gentle preface --- issue_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/issue_template.md b/issue_template.md index b40eb75..382d937 100644 --- a/issue_template.md +++ b/issue_template.md @@ -1,6 +1,6 @@ --- name: Bug report -about: Create a report to help us debug +about: Create a report to help us debug, it would be nice to fill the template as much as you can to help us, help you and help us all. --- From a749fbb3c9710791297762638efcd779c83c42c9 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 18 May 2020 21:20:48 +0200 Subject: [PATCH 14/47] Update README_fr.md --- README_fr.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README_fr.md b/README_fr.md index c37d358..22ba182 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,7 +6,7 @@ *[Read this readme in english.](./README.md)* > *Ce package vous permet d'installer REPLACEBYYOURAPP 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.* +Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* ## Vue d'ensemble Description rapide de cette application. @@ -15,11 +15,11 @@ Description rapide de cette application. ## Captures d'écran -![](Lien vers une capture d'écran pour cette application) +![](Lien vers une capture d'écran de cette application.) ## Démo -* [Démo officielle](Lien vers un site de démonstration pour cette application) +* [Démo officielle](Lien vers un site de démonstration de cette application.) ## Configuration @@ -27,12 +27,12 @@ Comment configurer cette application: via le panneau d'administration, un fichie ## Documentation - * Documentation officielle: Lien vers la documentation officielle de cette application + * Documentation officielle: Lien vers la documentation officielle de cette application. * Documentation YunoHost: Si une documentation spécifique est nécessaire, n'hésitez pas à contribuer. ## Caractéristiques spécifiques YunoHost -#### Support multi-utilisateurs +#### Support multi-utilisateur L'authentification LDAP et HTTP est-elle prise en charge? L'application peut-elle être utilisée par plusieurs utilisateurs? @@ -49,7 +49,7 @@ L'application peut-elle être utilisée par plusieurs utilisateurs? ## Informations additionnelles -* Autres informations à ajouter sur cette application +* Autres informations que vous souhaitez ajouter sur cette application. **Plus d'informations sur la page de documentation:** https://yunohost.org/packaging_apps @@ -57,8 +57,8 @@ https://yunohost.org/packaging_apps ## Liens * Signaler un bug: https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/issues - * Site de l'application: Lien vers le site officiel de cette application - * Dépôt de l'application principale: Lien vers le dépôt officiel de l'application principale + * Site de l'application: Lien vers le site officiel de cette application. + * Dépôt de l'application principale: Lien vers le dépôt officiel de l'application principale. * Site web YunoHost: https://yunohost.org/ --- From e3e27af7b8cb362098f29d91f53caf7027fb4e96 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 19 May 2020 09:34:11 +0200 Subject: [PATCH 15/47] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 4cbacc8..cf96730 100755 --- a/scripts/install +++ b/scripts/install @@ -297,7 +297,7 @@ ynh_use_logrotate ### If you're not using these lines: ### - You can remove these files in conf/. ### - Remove the section "REMOVE SERVICE FROM ADMIN PANEL" in the remove script -### - As well as the section "ADVERTISE SERVICE IN ADMIN PANEL" in the restore script +### - As well as the section "INTEGRATE SERVICE IN YUNOHOST" in the restore script yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log" From 6a9368b635e3d59403af717952ac9da6279ada0a Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 25 May 2020 18:50:37 +0200 Subject: [PATCH 16/47] Update scripts/backup Co-authored-by: JimboJoe --- scripts/backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index e33ae61..233936f 100755 --- a/scripts/backup +++ b/scripts/backup @@ -36,7 +36,7 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) # DECLARE DATA AND CONF FILES TO BACKUP #================================================= -ynh_print_info --message="Declaring files to be backuped..." +ynh_print_info --message="Declaring files to be backed up..." # N.B. : the following 'ynh_backup' calls are only a *declaration* of what needs # to be backuped and not an actual copy of any file. The actual backup that From 35c1777e9fd0b8fc92fc2c10644a3f3f878fc77e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 26 May 2020 16:06:58 +0200 Subject: [PATCH 17/47] Adding badges --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 371a13b..52d619b 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ # Example app for YunoHost -[![Integration level](https://dash.yunohost.org/integration/REPLACEBYYOURAPP.svg)](https://dash.yunohost.org/appci/app/REPLACEBYYOURAPP) +[![Integration level](https://dash.yunohost.org/integration/REPLACEBYYOURAPP.svg)](https://dash.yunohost.org/appci/app/REPLACEBYYOURAPP) ![](https://ci-apps.yunohost.org/ci/badges/REPLACEBYYOURAPP.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/REPLACEBYYOURAPP.maintain.svg) [![Install REPLACEBYYOURAPP with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=REPLACEBYYOURAPP) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 22ba182..d6c4805 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,6 +1,6 @@ # App exemple pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/REPLACEBYYOURAPP.svg)](https://dash.yunohost.org/appci/app/REPLACEBYYOURAPP) +[![Niveau d'intégration](https://dash.yunohost.org/integration/REPLACEBYYOURAPP.svg)](https://dash.yunohost.org/appci/app/REPLACEBYYOURAPP) ![](https://ci-apps.yunohost.org/ci/badges/REPLACEBYYOURAPP.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/REPLACEBYYOURAPP.maintain.svg) [![Installer REPLACEBYYOURAPP avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=REPLACEBYYOURAPP) *[Read this readme in english.](./README.md)* From c8d1977bc42b659c47aba090cdbe36ed683bb970 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 30 May 2020 14:28:55 +0200 Subject: [PATCH 18/47] just spacing changes --- scripts/backup | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/backup b/scripts/backup index 233936f..bc35846 100755 --- a/scripts/backup +++ b/scripts/backup @@ -35,7 +35,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= - ynh_print_info --message="Declaring files to be backed up..." # N.B. : the following 'ynh_backup' calls are only a *declaration* of what needs @@ -91,8 +90,7 @@ ynh_backup --src_path="/etc/cron.d/$app" #================================================= # BACKUP THE MYSQL DATABASE #================================================= - -ynh_print_info --message="Backing up the database..." +ynh_print_info --message="Backing up the MySQL database..." # (However, things like mysql dumps *do* take some time to run, though the # copy of the generated dump to the archive still happens later) From 3b50933861ec36b5d6de1d9be04a289f58a5fffa Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 30 May 2020 14:34:15 +0200 Subject: [PATCH 19/47] mark as comments --- scripts/backup | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/backup b/scripts/backup index 233936f..17638cb 100755 --- a/scripts/backup +++ b/scripts/backup @@ -38,10 +38,10 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) ynh_print_info --message="Declaring files to be backed up..." -# N.B. : the following 'ynh_backup' calls are only a *declaration* of what needs -# to be backuped and not an actual copy of any file. The actual backup that -# creates and fill the archive with the files happens in the core after this -# script is called. Hence ynh_backups calls takes basically 0 seconds to run. +### N.B. : the following 'ynh_backup' calls are only a *declaration* of what needs +### to be backuped and not an actual copy of any file. The actual backup that +### creates and fill the archive with the files happens in the core after this +### script is called. Hence ynh_backups calls takes basically 0 seconds to run. #================================================= # BACKUP THE APP MAIN DIR @@ -94,8 +94,8 @@ ynh_backup --src_path="/etc/cron.d/$app" ynh_print_info --message="Backing up the database..." -# (However, things like mysql dumps *do* take some time to run, though the -# copy of the generated dump to the archive still happens later) +### (However, things like mysql dumps *do* take some time to run, though the +### copy of the generated dump to the archive still happens later) ynh_mysql_dump_db --database="$db_name" > db.sql From 5da85731eb33eaefe7b86f93436b3817fa4cd972 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 30 May 2020 14:39:38 +0200 Subject: [PATCH 20/47] typo --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index e62ad56..be8caa4 100644 --- a/manifest.json +++ b/manifest.json @@ -49,7 +49,7 @@ "type": "user", "ask": { "en": "Choose an admin user", - "fr": "Choisissez l’administrateur" + "fr": "Choisissez l'administrateur" }, "example": "johndoe" }, From 6c0cc291dba5e35bdb3e5d949e612954d81f42b9 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 30 May 2020 14:44:06 +0200 Subject: [PATCH 21/47] removing Jessie in French --- README_fr.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README_fr.md b/README_fr.md index 22ba182..69dd2d8 100644 --- a/README_fr.md +++ b/README_fr.md @@ -41,7 +41,6 @@ L'application peut-elle être utilisée par plusieurs utilisateurs? * x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/REPLACEBYYOURAPP/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/REPLACEBYYOURAPP/) -* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/REPLACEBYYOURAPP%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/REPLACEBYYOURAPP/) ## Limitations From 49c7cbcd290e9f961cf5e8df867059af8a030c2b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 30 May 2020 14:59:12 +0200 Subject: [PATCH 22/47] improving modify a config file step during upgrade --- scripts/upgrade | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 243e85b..e7de87b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -147,12 +147,15 @@ ynh_add_fpm_config #================================================= #================================================= -# STORE THE CONFIG FILE CHECKSUM +# MODIFY A CONFIG FILE #================================================= ### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script. ### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it. ynh_backup_if_checksum_is_different --file="$final_path/CONFIG_FILE" + +ynh_replace_string --match_string="match_string" --replace_string="replace_string" --target_file="$final_path/CONFIG_FILE" + # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum --file="$final_path/CONFIG_FILE" From 19dcc50aa491e318d012c1a21a9912967955da66 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 30 May 2020 15:05:55 +0200 Subject: [PATCH 23/47] fix message to be consistent with other scripts --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index a153a70..f46178f 100755 --- a/scripts/restore +++ b/scripts/restore @@ -24,7 +24,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading settings..." --time --weight=1 +ynh_script_progression --message="Loading installation settings..." --time --weight=1 app=$YNH_APP_INSTANCE_NAME From be2ab368cdbae6a3c0cffd13d0ddad4538667603 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 30 May 2020 15:15:16 +0200 Subject: [PATCH 24/47] missing --time --weight=1 --- scripts/remove | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index 1fc81f3..9d27c8b 100755 --- a/scripts/remove +++ b/scripts/remove @@ -97,7 +97,7 @@ ynh_remove_logrotate if yunohost firewall list | grep -q "\- $port$" then - ynh_script_progression --message="Closing port $port..." + ynh_script_progression --message="Closing port $port..." --time --weight=1 ynh_exec_warn_less yunohost firewall disallow TCP $port fi From 4a44539d1d91951f029f6c8fc65ca99b725d8cec Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 4 Jun 2020 16:51:14 +0200 Subject: [PATCH 25/47] Service integration homogenization --- scripts/install | 3 ++- scripts/remove | 2 +- scripts/restore | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 05c1b71..0a52780 100755 --- a/scripts/install +++ b/scripts/install @@ -290,13 +290,14 @@ ynh_use_logrotate #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1 ### `yunohost service add` integrates a service in YunoHost. It then gets ### displayed in the admin interface and through the others `yunohost service` commands. ### (N.B. : this line only makes sense if the app adds a service to the system!) ### If you're not using these lines: ### - You can remove these files in conf/. -### - Remove the section "REMOVE SERVICE FROM ADMIN PANEL" in the remove script +### - Remove the section "REMOVE SERVICE INTEGRATION IN YUNOHOST" in the remove script ### - As well as the section "INTEGRATE SERVICE IN YUNOHOST" in the restore script yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log" diff --git a/scripts/remove b/scripts/remove index 9d27c8b..bb5566b 100755 --- a/scripts/remove +++ b/scripts/remove @@ -31,7 +31,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) # Remove the service from the list of services known by Yunohost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null then - ynh_script_progression --message="Removing $app service..." --time --weight=1 + ynh_script_progression --message="Removing $app service integration..." --time --weight=1 yunohost service remove $app fi diff --git a/scripts/restore b/scripts/restore index 323afa0..0487f95 100755 --- a/scripts/restore +++ b/scripts/restore @@ -120,6 +120,7 @@ systemctl enable $app.service #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1 yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log" From 67437ba64dcbc4a5e0261b4b92311f67d357c08f Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 4 Jun 2020 16:52:38 +0200 Subject: [PATCH 26/47] Adding service integration step during upgrade --- scripts/install | 1 + scripts/upgrade | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/scripts/install b/scripts/install index 0a52780..d70aa7d 100755 --- a/scripts/install +++ b/scripts/install @@ -299,6 +299,7 @@ ynh_script_progression --message="Integrating service in YunoHost..." --time --w ### - You can remove these files in conf/. ### - Remove the section "REMOVE SERVICE INTEGRATION IN YUNOHOST" in the remove script ### - As well as the section "INTEGRATE SERVICE IN YUNOHOST" in the restore script +### - And the section "INTEGRATE SERVICE IN YUNOHOST" in the upgrade script yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log" diff --git a/scripts/upgrade b/scripts/upgrade index e7de87b..59204f6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -204,6 +204,13 @@ then ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" fi +#================================================= +# INTEGRATE SERVICE IN YUNOHOST +#================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1 + +yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log" + #================================================= # START SYSTEMD SERVICE #================================================= From 265e7b02ca64117d022222e46aff092d15f1262e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 4 Jun 2020 17:22:45 +0200 Subject: [PATCH 27/47] Change upgrade steps order to be homogeneous with install steps order --- scripts/upgrade | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index e7de87b..200b238 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -146,6 +146,14 @@ ynh_add_fpm_config # ... #================================================= +#================================================= +# SETUP SYSTEMD +#================================================= +ynh_script_progression --message="Upgrading systemd configuration..." --time --weight=1 + +# Create a dedicated systemd config +ynh_add_systemd_config + #================================================= # MODIFY A CONFIG FILE #================================================= @@ -159,6 +167,15 @@ ynh_replace_string --match_string="match_string" --replace_string="replace_strin # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum --file="$final_path/CONFIG_FILE" +#================================================= +# GENERIC FINALIZATION +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= + +# Set permissions on app files +chown -R root: $final_path + #================================================= # SETUP LOGROTATE #================================================= @@ -168,15 +185,12 @@ ynh_script_progression --message="Upgrading logrotate configuration..." --time - ynh_use_logrotate --non-append #================================================= -# SETUP SYSTEMD +# START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Upgrading systemd configuration..." --time --weight=1 +ynh_script_progression --message="Starting a systemd service..." --time --weight=1 -# Create a dedicated systemd config -ynh_add_systemd_config +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" -#================================================= -# GENERIC FINALIZATION #================================================= # UPGRADE FAIL2BAN #================================================= @@ -185,13 +199,6 @@ ynh_script_progression --message="Reconfiguring fail2ban..." --time --weight=1 # Create a dedicated fail2ban config ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login" -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions on app files -chown -R root: $final_path - #================================================= # SETUP SSOWAT #================================================= @@ -204,13 +211,6 @@ then ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" fi -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Starting a systemd service..." --time --weight=1 - -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" - #================================================= # RELOAD NGINX #================================================= From 6e9e1728b070f6c423dfaaed3f5cff6b6387f28b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 4 Jun 2020 17:24:38 +0200 Subject: [PATCH 28/47] Revert "Change upgrade steps order" This reverts commit 265e7b02ca64117d022222e46aff092d15f1262e. --- scripts/upgrade | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 200b238..e7de87b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -146,14 +146,6 @@ ynh_add_fpm_config # ... #================================================= -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Upgrading systemd configuration..." --time --weight=1 - -# Create a dedicated systemd config -ynh_add_systemd_config - #================================================= # MODIFY A CONFIG FILE #================================================= @@ -167,15 +159,6 @@ ynh_replace_string --match_string="match_string" --replace_string="replace_strin # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum --file="$final_path/CONFIG_FILE" -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions on app files -chown -R root: $final_path - #================================================= # SETUP LOGROTATE #================================================= @@ -185,12 +168,15 @@ ynh_script_progression --message="Upgrading logrotate configuration..." --time - ynh_use_logrotate --non-append #================================================= -# START SYSTEMD SERVICE +# SETUP SYSTEMD #================================================= -ynh_script_progression --message="Starting a systemd service..." --time --weight=1 +ynh_script_progression --message="Upgrading systemd configuration..." --time --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +# Create a dedicated systemd config +ynh_add_systemd_config +#================================================= +# GENERIC FINALIZATION #================================================= # UPGRADE FAIL2BAN #================================================= @@ -199,6 +185,13 @@ ynh_script_progression --message="Reconfiguring fail2ban..." --time --weight=1 # Create a dedicated fail2ban config ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login" +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= + +# Set permissions on app files +chown -R root: $final_path + #================================================= # SETUP SSOWAT #================================================= @@ -211,6 +204,13 @@ then ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" fi +#================================================= +# START SYSTEMD SERVICE +#================================================= +ynh_script_progression --message="Starting a systemd service..." --time --weight=1 + +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" + #================================================= # RELOAD NGINX #================================================= From 26a5c52d5b64d280afe47fd1581226357c2028e4 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 4 Jun 2020 17:26:46 +0200 Subject: [PATCH 29/47] Change step upgrade step order to be compliant with install script --- scripts/upgrade | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index e7de87b..200b238 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -146,6 +146,14 @@ ynh_add_fpm_config # ... #================================================= +#================================================= +# SETUP SYSTEMD +#================================================= +ynh_script_progression --message="Upgrading systemd configuration..." --time --weight=1 + +# Create a dedicated systemd config +ynh_add_systemd_config + #================================================= # MODIFY A CONFIG FILE #================================================= @@ -159,6 +167,15 @@ ynh_replace_string --match_string="match_string" --replace_string="replace_strin # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum --file="$final_path/CONFIG_FILE" +#================================================= +# GENERIC FINALIZATION +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= + +# Set permissions on app files +chown -R root: $final_path + #================================================= # SETUP LOGROTATE #================================================= @@ -168,15 +185,12 @@ ynh_script_progression --message="Upgrading logrotate configuration..." --time - ynh_use_logrotate --non-append #================================================= -# SETUP SYSTEMD +# START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Upgrading systemd configuration..." --time --weight=1 +ynh_script_progression --message="Starting a systemd service..." --time --weight=1 -# Create a dedicated systemd config -ynh_add_systemd_config +ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" -#================================================= -# GENERIC FINALIZATION #================================================= # UPGRADE FAIL2BAN #================================================= @@ -185,13 +199,6 @@ ynh_script_progression --message="Reconfiguring fail2ban..." --time --weight=1 # Create a dedicated fail2ban config ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login" -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions on app files -chown -R root: $final_path - #================================================= # SETUP SSOWAT #================================================= @@ -204,13 +211,6 @@ then ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" fi -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Starting a systemd service..." --time --weight=1 - -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" - #================================================= # RELOAD NGINX #================================================= From b5a7e543ffb1dc6667a31aed55cb67ebb19b8d6e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 4 Jun 2020 17:38:27 +0200 Subject: [PATCH 30/47] Bored of the A CRON FILE step because in the example, there is more than juste the cron file in the remove script --- scripts/backup | 4 +++- scripts/remove | 2 +- scripts/restore | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/backup b/scripts/backup index b1a1241..3e9328e 100755 --- a/scripts/backup +++ b/scripts/backup @@ -83,11 +83,13 @@ ynh_backup --src_path="/etc/logrotate.d/$app" ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= -# BACKUP A CRON FILE +# BACKUP VARIOUS FILES #================================================= ynh_backup --src_path="/etc/cron.d/$app" +ynh_backup --src_path="/etc/$app/" + #================================================= # BACKUP THE MYSQL DATABASE #================================================= diff --git a/scripts/remove b/scripts/remove index 9d27c8b..b35ca81 100755 --- a/scripts/remove +++ b/scripts/remove @@ -112,7 +112,7 @@ ynh_remove_fail2ban_config #================================================= # SPECIFIC REMOVE #================================================= -# REMOVE THE CRON FILE +# REMOVE VARIOUS FILES #================================================= # Remove a cron file diff --git a/scripts/restore b/scripts/restore index 323afa0..26b7697 100755 --- a/scripts/restore +++ b/scripts/restore @@ -131,11 +131,13 @@ ynh_script_progression --message="Starting a systemd service..." --time --weight ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" #================================================= -# RESTORE THE CRON FILE +# RESTORE VARIOUS FILES #================================================= ynh_restore_file --origin_path="/etc/cron.d/$app" +ynh_restore_file --origin_path="/etc/$app/" + #================================================= # RESTORE THE LOGROTATE CONFIGURATION #================================================= From 8060d5354248c71b4429ced83e45f99753196afe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 10 Jun 2020 10:56:47 +0200 Subject: [PATCH 31/47] Update README_fr.md --- README_fr.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README_fr.md b/README_fr.md index 22b446d..596e9cc 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,13 +5,13 @@ *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer REPLACEBYYOURAPP rapidement et simplement sur un serveur Yunohost. +> *Ce package vous permet d'installer REPLACEBYYOURAPP rapidement et simplement sur un serveur YunoHost. Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* ## Vue d'ensemble Description rapide de cette application. -**Version incluse:** 1.0 +**Version incluse :** 1.0 ## Captures d'écran @@ -23,23 +23,23 @@ Description rapide de cette application. ## Configuration -Comment configurer cette application: via le panneau d'administration, un fichier brut en SSH ou tout autre moyen. +Comment configurer cette application : via le panneau d'administration, un fichier brut en SSH ou tout autre moyen. ## Documentation - * Documentation officielle: Lien vers la documentation officielle de cette application. - * Documentation YunoHost: Si une documentation spécifique est nécessaire, n'hésitez pas à contribuer. + * Documentation officielle : Lien vers la documentation officielle de cette application. + * Documentation YunoHost : Si une documentation spécifique est nécessaire, n'hésitez pas à contribuer. ## Caractéristiques spécifiques YunoHost #### Support multi-utilisateur -L'authentification LDAP et HTTP est-elle prise en charge? -L'application peut-elle être utilisée par plusieurs utilisateurs? +* L'authentification LDAP et HTTP est-elle prise en charge ? +* L'application peut-elle être utilisée par plusieurs utilisateurs ? #### Architectures supportées -* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/REPLACEBYYOURAPP/) +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/REPLACEBYYOURAPP/) * ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/REPLACEBYYOURAPP/) ## Limitations @@ -50,15 +50,15 @@ L'application peut-elle être utilisée par plusieurs utilisateurs? * Autres informations que vous souhaitez ajouter sur cette application. -**Plus d'informations sur la page de documentation:** +**Plus d'informations sur la page de documentation :** https://yunohost.org/packaging_apps ## Liens - * Signaler un bug: https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/issues - * Site de l'application: Lien vers le site officiel de cette application. - * Dépôt de l'application principale: Lien vers le dépôt officiel de l'application principale. - * Site web YunoHost: https://yunohost.org/ + * Signaler un bug : https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/issues + * Site de l'application : Lien vers le site officiel de cette application. + * Dépôt de l'application principale : Lien vers le dépôt officiel de l'application principale. + * Site web YunoHost : https://yunohost.org/ --- From d2f32be8ed23958519824501b686408b658a5074 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 16 Jun 2020 23:07:13 +0200 Subject: [PATCH 32/47] Update upgrade --- scripts/upgrade | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index ac38a6f..2076e33 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -184,6 +184,13 @@ ynh_script_progression --message="Upgrading logrotate configuration..." --time - # Use logrotate to manage app-specific logfile(s) ynh_use_logrotate --non-append +#================================================= +# INTEGRATE SERVICE IN YUNOHOST +#================================================= +ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1 + +yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log" + #================================================= # START SYSTEMD SERVICE #================================================= @@ -211,20 +218,6 @@ then ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" fi -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1 - -yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log" - -#================================================= -# START SYSTEMD SERVICE -#================================================= -ynh_script_progression --message="Starting a systemd service..." --time --weight=1 - -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" - #================================================= # RELOAD NGINX #================================================= From 0286778ba5a31806072ca02d17d038e25496736e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 30 Jun 2020 00:33:32 +0200 Subject: [PATCH 33/47] Improve issue template --- issue_template.md | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/issue_template.md b/issue_template.md index 382d937..87b88d4 100644 --- a/issue_template.md +++ b/issue_template.md @@ -1,22 +1,24 @@ --- name: Bug report -about: Create a report to help us debug, it would be nice to fill the template as much as you can to help us, help you and help us all. +about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently. --- **How to post a meaningful bug report** 1. *Read this whole template first.* -2. *Determine if you are on the right place:* +2. *Make sure you are on the right place:* - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change url...), you are on the right place!* - - *Otherwise, the issue may be due to REPLACEBYYOURAPP itself. Refer to its documentation or repository for help.* - - *If you have a doubt, post here, we will figure it out together.* -3. *Delete the italic comments as you write over them below, and remove this guide.* + - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* + - *In doubt, ask here and we will figure it out together.* +3. *Delete these italic comments as you write over them below, and remove this guide.* --- -**Describe the bug** +### Describe the bug + *A clear and concise description of what the bug is.* -**Versions** +### Context + - Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* - YunoHost version: x.x.x - I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* @@ -25,8 +27,8 @@ about: Create a report to help us debug, it would be nice to fill the template a - Using, or trying to install package version/branch: - If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* -**To Reproduce** -*Steps to reproduce the behavior.* +### Steps to reproduce + - *If you performed a command from the CLI, the command itself is enough. For example:* ```sh sudo yunohost app install REPLACEBYYOURAPP @@ -38,9 +40,16 @@ about: Create a report to help us debug, it would be nice to fill the template a 3. *Scroll down to '....'* 4. *See error* -**Expected behavior** +### Expected behavior + *A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* -**Logs** -*After a failed command, YunoHost makes the log available to you, but also to others, thanks to `yunohost log display [log name] --share`. The actual command, with the correct log name, is displayed at the end of the failed attempt in the CLI. Execute it and copy here the share link it outputs.* +### Logs + +*When an operation fails, YunoHost provides a simple way to share the logs.* +- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.* +- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.* + +*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)* + *If applicable and useful, add screenshots to help explain your problem.* From b0501eade9ec75c71597d21e29a727e5e4669a97 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 2 Aug 2020 15:41:28 +0200 Subject: [PATCH 34/47] Typos --- README.md | 3 +-- README_fr.md | 3 +-- scripts/change_url | 16 ++++++++-------- scripts/install | 14 +++++++------- scripts/remove | 10 +++++----- scripts/restore | 4 ++-- 6 files changed, 24 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 52d619b..3af82e0 100644 --- a/README.md +++ b/README.md @@ -71,8 +71,7 @@ https://yunohost.org/packaging_apps --- -Developer info ----------------- +## Developer info **Only if you want to use a testing branch for coding, instead of merging directly into master.** Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing). diff --git a/README_fr.md b/README_fr.md index 596e9cc..20b47cb 100644 --- a/README_fr.md +++ b/README_fr.md @@ -62,8 +62,7 @@ https://yunohost.org/packaging_apps --- -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/REPLACEBYYOURAPP_ynh/tree/testing). diff --git a/scripts/change_url b/scripts/change_url index 3f21bc8..489a674 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -37,7 +37,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before changing its url (may take a while)..." --time --weight=1 +ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --time --weight=1 # Backup the current version of the app ynh_backup_before_upgrade @@ -79,23 +79,23 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating nginx web server configuration..." --time --weight=1 +ynh_script_progression --message="Updating NGINX web server configuration..." --time --weight=1 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 -# Change the domain for nginx +# Change the domain for NGINX if [ $change_domain -eq 1 ] then # Delete file checksum for the old conf file location @@ -123,7 +123,7 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --time --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/install b/scripts/install index d70aa7d..2e4028f 100755 --- a/scripts/install +++ b/scripts/install @@ -148,11 +148,11 @@ ynh_setup_source --dest_dir="$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." --time --weight=1 +ynh_script_progression --message="Configuring NGINX web server..." --time --weight=1 ### `ynh_add_nginx_config` will use the file conf/nginx.conf -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -166,7 +166,7 @@ ynh_system_user_create --username=$app #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring php-fpm..." --time --weight=1 +ynh_script_progression --message="Configuring PHP-FPM..." --time --weight=1 ### `ynh_add_fpm_config` is used to set up a PHP config. ### You can remove it if your app doesn't use PHP. @@ -179,7 +179,7 @@ ynh_script_progression --message="Configuring php-fpm..." --time --weight=1 ### With the reload at the end of the script. ### - And the section "PHP-FPM CONFIGURATION" in the upgrade script -# Create a dedicated php-fpm config +# Create a dedicated PHP-FPM config ynh_add_fpm_config #================================================= @@ -339,9 +339,9 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap #================================================= # SETUP FAIL2BAN #================================================= -ynh_script_progression --message="Configuring fail2ban..." --time --weight=1 +ynh_script_progression --message="Configuring Fail2ban..." --time --weight=1 -# Create a dedicated fail2ban config +# Create a dedicated Fail2ban config ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login" #================================================= @@ -359,7 +359,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --time --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1 ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/remove b/scripts/remove index ff9228f..64af672 100755 --- a/scripts/remove +++ b/scripts/remove @@ -70,15 +70,15 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration..." --time --weight=1 +ynh_script_progression --message="Removing NGINX web server configuration..." --time --weight=1 -# Remove the dedicated nginx config +# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= # REMOVE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Removing php-fpm configuration..." --time --weight=1 +ynh_script_progression --message="Removing PHP-FPM configuration..." --time --weight=1 # Remove the dedicated php-fpm config ynh_remove_fpm_config @@ -104,9 +104,9 @@ fi #================================================= # REMOVE FAIL2BAN CONFIGURATION #================================================= -ynh_script_progression --message="Removing fail2ban configuration..." --time --weight=1 +ynh_script_progression --message="Removing Fail2ban configuration..." --time --weight=1 -# Remove the dedicated fail2ban config +# Remove the dedicated Fail2ban config ynh_remove_fail2ban_config #================================================= diff --git a/scripts/restore b/scripts/restore index 931f72b..3cbe1a4 100755 --- a/scripts/restore +++ b/scripts/restore @@ -84,7 +84,7 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= # RESTORE FAIL2BAN CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the fail2ban configuration..." --time --weight=1 +ynh_script_progression --message="Restoring the Fail2ban configuration..." --time --weight=1 ynh_restore_file "/etc/fail2ban/jail.d/$app.conf" ynh_restore_file "/etc/fail2ban/filter.d/$app.conf" @@ -150,7 +150,7 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_script_progression --message="Reloading nginx web server and php-fpm..." --time --weight=1 +ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --time --weight=1 ynh_systemd_action --service_name=php$phpversion-fpm --action=reload ynh_systemd_action --service_name=nginx --action=reload From 644d29331acfd513f692d381837a8d1f7614dd6b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 2 Aug 2020 16:00:17 +0200 Subject: [PATCH 35/47] Typos --- scripts/backup | 4 ++-- scripts/change_url | 2 +- scripts/install | 21 ++++++++++----------- scripts/remove | 2 +- scripts/restore | 2 +- scripts/upgrade | 20 ++++++++++---------- 6 files changed, 25 insertions(+), 26 deletions(-) diff --git a/scripts/backup b/scripts/backup index 3e9328e..6ea8892 100755 --- a/scripts/backup +++ b/scripts/backup @@ -6,7 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= -#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts +# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -95,7 +95,7 @@ ynh_backup --src_path="/etc/$app/" #================================================= ynh_print_info --message="Backing up the MySQL database..." -### (However, things like mysql dumps *do* take some time to run, though the +### (However, things like MySQL dumps *do* take some time to run, though the ### copy of the generated dump to the archive still happens later) ynh_mysql_dump_db --database="$db_name" > db.sql diff --git a/scripts/change_url b/scripts/change_url index 489a674..126010e 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -45,7 +45,7 @@ ynh_clean_setup () { # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" - # restore it if the upgrade fails + # Restore it if the upgrade fails ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script diff --git a/scripts/install b/scripts/install index 2e4028f..95e68a3 100755 --- a/scripts/install +++ b/scripts/install @@ -33,14 +33,14 @@ password=$YNH_APP_ARG_PASSWORD ### If it's a multi-instance app, meaning it can be installed several times independently ### The id of the app as stated in the manifest is available as $YNH_APP_ID -### The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2", ...) +### The instance number is available as $YNH_APP_INSTANCE_NUMBER (equals "1", "2"...) ### The app instance name is available as $YNH_APP_INSTANCE_NAME ### - the first time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample ### - the second time the app is installed, YNH_APP_INSTANCE_NAME = ynhexample__2 -### - ynhexample__{N} for the subsequent installations, with N=3,4, ... +### - ynhexample__{N} for the subsequent installations, with N=3,4... ### The app instance name is probably what interests you most, since this is ### guaranteed to be unique. This is a good unique identifier to define installation path, -### db names, ... +### db names... app=$YNH_APP_INSTANCE_NAME #================================================= @@ -56,8 +56,8 @@ app=$YNH_APP_INSTANCE_NAME ### The execution time is given for the duration since the previous call. So the weight should be applied to this previous call. ynh_script_progression --message="Validating installation parameters..." --time --weight=1 -### If the app uses nginx as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app". -### If the app provides an internal web server (or uses another application server such as uwsgi), the final path should be "/opt/yunohost/$app" +### If the app uses NGINX as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app". +### If the app provides an internal web server (or uses another application server such as uWSGI), the final path should be "/opt/yunohost/$app" final_path=/var/www/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" @@ -92,7 +92,7 @@ port=$(ynh_find_port --port=8095) ynh_app_setting_set --app=$app --key=port --value=$port # Optional: Expose this port publicly -# (N.B. : you only need to do this if the app actually needs to expose the port publicly. +# (N.B.: you only need to do this if the app actually needs to expose the port publicly. # If you do this and the app doesn't actually need you are CREATING SECURITY HOLES IN THE SERVER !) # Open the port @@ -176,7 +176,7 @@ ynh_script_progression --message="Configuring PHP-FPM..." --time --weight=1 ### - Remove the section "BACKUP THE PHP-FPM CONFIGURATION" in the backup script ### - Remove also the section "REMOVE PHP-FPM CONFIGURATION" in the remove script ### - As well as the section "RESTORE THE PHP-FPM CONFIGURATION" in the restore script -### With the reload at the end of the script. +### with the reload at the end of the script. ### - And the section "PHP-FPM CONFIGURATION" in the upgrade script # Create a dedicated PHP-FPM config @@ -225,7 +225,7 @@ ynh_app_setting_set --app=$app --key=skipped_uris --value="/" # Reload SSOwat config yunohost app ssowatconf -# Reload Nginx +# Reload NGINX ynh_systemd_action --service_name=nginx --action=reload # Installation with curl @@ -294,7 +294,7 @@ ynh_script_progression --message="Integrating service in YunoHost..." --time --w ### `yunohost service add` integrates a service in YunoHost. It then gets ### displayed in the admin interface and through the others `yunohost service` commands. -### (N.B. : this line only makes sense if the app adds a service to the system!) +### (N.B.: this line only makes sense if the app adds a service to the system!) ### If you're not using these lines: ### - You can remove these files in conf/. ### - Remove the section "REMOVE SERVICE INTEGRATION IN YUNOHOST" in the remove script @@ -307,7 +307,7 @@ yunohost service add $app --description "A short description of the app" --log " ### ### --needs_exposed_ports "$port" a list of ports that needs to be publicly exposed ### which will then be checked by YunoHost's diagnosis system -### (N.B. DO NOT USE THIS is the port is only internal !!!) +### (N.B. DO NOT USE THIS is the port is only internal!!!) ### ### --test_status "some command" a custom command to check the status of the service ### (only relevant if 'systemctl status' doesn't do a good job) @@ -318,7 +318,6 @@ yunohost service add $app --description "A short description of the app" --log " ### to proceed if you later realize that you need to enable some flags that ### weren't enabled on old installs (be careful it'll override the existing ### service though so you should re-provide all relevant flags when doing so) -### #================================================= # START SYSTEMD SERVICE diff --git a/scripts/remove b/scripts/remove index 64af672..f77545a 100755 --- a/scripts/remove +++ b/scripts/remove @@ -80,7 +80,7 @@ ynh_remove_nginx_config #================================================= ynh_script_progression --message="Removing PHP-FPM configuration..." --time --weight=1 -# Remove the dedicated php-fpm config +# Remove the dedicated PHP-FPM config ynh_remove_fpm_config #================================================= diff --git a/scripts/restore b/scripts/restore index 3cbe1a4..a06bd42 100755 --- a/scripts/restore +++ b/scripts/restore @@ -6,7 +6,7 @@ # IMPORT GENERIC HELPERS #================================================= -#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts +# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers diff --git a/scripts/upgrade b/scripts/upgrade index 2076e33..b460196 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -70,7 +70,7 @@ ynh_script_progression --message="Backing up the app before upgrading (may take # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { - # restore it if the upgrade fails + # Restore it if the upgrade fails ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script @@ -81,9 +81,9 @@ ynh_abort_if_errors #================================================= # Normalize the URL path syntax -# N.B. : this is for app installations before YunoHost 2.7 +# N.B.: this is for app installations before YunoHost 2.7 # where this value might be something like /foo/ or foo/ -# instead of /foo .... +# instead of /foo # If nobody installed your app before 2.7, then you may # safely remove this line path_url=$(ynh_normalize_url_path --path_url=$path_url) @@ -112,9 +112,9 @@ fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." --time --weight=1 +ynh_script_progression --message="Upgrading NGINX web server configuration..." --time --weight=1 -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config #================================================= @@ -135,9 +135,9 @@ ynh_system_user_create --username=$app #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading php-fpm configuration..." --time --weight=1 +ynh_script_progression --message="Upgrading PHP-FPM configuration..." --time --weight=1 -# Create a dedicated php-fpm config +# Create a dedicated PHP-FPM config ynh_add_fpm_config #================================================= @@ -201,9 +201,9 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap #================================================= # UPGRADE FAIL2BAN #================================================= -ynh_script_progression --message="Reconfiguring fail2ban..." --time --weight=1 +ynh_script_progression --message="Reconfiguring Fail2ban..." --time --weight=1 -# Create a dedicated fail2ban config +# Create a dedicated Fail2ban config ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login" #================================================= @@ -221,7 +221,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --time --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1 ynh_systemd_action --service_name=nginx --action=reload From 681dd011714070049c441f3c268167f8745e1243 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 2 Sep 2020 15:48:30 +0200 Subject: [PATCH 36/47] Update issue_template.md --- issue_template.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/issue_template.md b/issue_template.md index 87b88d4..4a290c4 100644 --- a/issue_template.md +++ b/issue_template.md @@ -6,11 +6,11 @@ about: When creating a bug report, please use the following template to provide **How to post a meaningful bug report** 1. *Read this whole template first.* -2. *Make sure you are on the right place:* - - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change url...), you are on the right place!* - - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* - - *In doubt, ask here and we will figure it out together.* -3. *Delete these italic comments as you write over them below, and remove this guide.* +2. *Determine if you are on the right place:* + - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* + - *Otherwise, the issue may be due to REPLACEBYYOURAPP itself. Refer to its documentation or repository for help.* + - *When in doubt, post here and we will figure it out together.* +3. *Delete the italic comments as you write over them below, and remove this guide.* --- ### Describe the bug @@ -22,7 +22,7 @@ about: When creating a bug report, please use the following template to provide - Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* - YunoHost version: x.x.x - I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* -- Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?: *no / yes* +- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes* - If yes, please explain: - Using, or trying to install package version/branch: - If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* @@ -36,8 +36,8 @@ about: When creating a bug report, please use the following template to provide - *If you used the webadmin, please perform the equivalent command from the CLI first.* - *If the error occurs in your browser, explain what you did:* 1. *Go to '...'* - 2. *Click on '....'* - 3. *Scroll down to '....'* + 2. *Click on '...'* + 3. *Scroll down to '...'* 4. *See error* ### Expected behavior From d7f1d45dda58a53f0c8ab20345e6edbf68cdf94c Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 19 Sep 2020 16:26:41 +0200 Subject: [PATCH 37/47] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> --- scripts/install | 4 ++-- scripts/remove | 2 +- scripts/restore | 2 +- scripts/upgrade | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 95e68a3..6a82d9f 100755 --- a/scripts/install +++ b/scripts/install @@ -338,9 +338,9 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap #================================================= # SETUP FAIL2BAN #================================================= -ynh_script_progression --message="Configuring Fail2ban..." --time --weight=1 +ynh_script_progression --message="Configuring Fail2Ban..." --time --weight=1 -# Create a dedicated Fail2ban config +# Create a dedicated Fail2Ban config ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login" #================================================= diff --git a/scripts/remove b/scripts/remove index f77545a..0bb92f5 100755 --- a/scripts/remove +++ b/scripts/remove @@ -106,7 +106,7 @@ fi #================================================= ynh_script_progression --message="Removing Fail2ban configuration..." --time --weight=1 -# Remove the dedicated Fail2ban config +# Remove the dedicated Fail2Ban config ynh_remove_fail2ban_config #================================================= diff --git a/scripts/restore b/scripts/restore index a06bd42..1938dfe 100755 --- a/scripts/restore +++ b/scripts/restore @@ -84,7 +84,7 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" #================================================= # RESTORE FAIL2BAN CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the Fail2ban configuration..." --time --weight=1 +ynh_script_progression --message="Restoring the Fail2Ban configuration..." --time --weight=1 ynh_restore_file "/etc/fail2ban/jail.d/$app.conf" ynh_restore_file "/etc/fail2ban/filter.d/$app.conf" diff --git a/scripts/upgrade b/scripts/upgrade index b460196..23f2e0e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -201,9 +201,9 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap #================================================= # UPGRADE FAIL2BAN #================================================= -ynh_script_progression --message="Reconfiguring Fail2ban..." --time --weight=1 +ynh_script_progression --message="Reconfiguring Fail2Ban..." --time --weight=1 -# Create a dedicated Fail2ban config +# Create a dedicated Fail2Ban config ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login" #================================================= From f2ca6c9efd0fd974e855f0739a35f9db9d2c8a6a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 10 Oct 2020 12:02:45 +0200 Subject: [PATCH 38/47] Update app.src --- conf/app.src | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/app.src b/conf/app.src index e4dd89f..17489bf 100644 --- a/conf/app.src +++ b/conf/app.src @@ -4,3 +4,4 @@ SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true SOURCE_FILENAME= +SOURCE_EXTRACT=true From 722bcf35bcfddd8af7cd94e6bad4761981b8f984 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 27 Nov 2020 18:48:03 +0100 Subject: [PATCH 39/47] Update restore --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 931f72b..e54836c 100755 --- a/scripts/restore +++ b/scripts/restore @@ -115,7 +115,7 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./ ynh_script_progression --message="Restoring the systemd configuration..." --time --weight=1 ynh_restore_file --origin_path="/etc/systemd/system/$app.service" -systemctl enable $app.service +systemctl enable $app.service --quiet #================================================= # INTEGRATE SERVICE IN YUNOHOST From 5c11751afedcaa3756918ac1bb5cb6b15aceebea Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 1 Dec 2020 00:22:50 +0100 Subject: [PATCH 40/47] Remove migration of 'is_public' being a string --- scripts/upgrade | 9 --------- 1 file changed, 9 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 23f2e0e..3474983 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -41,15 +41,6 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --time --weight=1 -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=0 - is_public=0 -fi - # If db_name doesn't exist, create it if [ -z "$db_name" ]; then db_name=$(ynh_sanitize_dbid --db_name=$app) From 0e728462e511f6cfda73c31197f7fd501be3421d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 1 Dec 2020 00:27:28 +0100 Subject: [PATCH 41/47] These should not be added by default either so comment them... --- scripts/upgrade | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 3474983..a2c9ad1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -41,17 +41,23 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --time --weight=1 +# +# N.B. : the followings setting migrations snippets are provided as *EXAMPLES* +# of what you may want to do in some cases (e.g. a setting was not defined on +# some legacy installs and you therefore want to initiaze stuff during upgrade) +# + # If db_name doesn't exist, create it -if [ -z "$db_name" ]; then - db_name=$(ynh_sanitize_dbid --db_name=$app) - ynh_app_setting_set --app=$app --key=db_name --value=$db_name -fi +#if [ -z "$db_name" ]; then +# db_name=$(ynh_sanitize_dbid --db_name=$app) +# ynh_app_setting_set --app=$app --key=db_name --value=$db_name +#fi # If final_path doesn't exist, create it -if [ -z "$final_path" ]; then - final_path=/var/www/$app - ynh_app_setting_set --app=$app --key=final_path --value=$final_path -fi +#if [ -z "$final_path" ]; then +# final_path=/var/www/$app +# ynh_app_setting_set --app=$app --key=final_path --value=$final_path +#fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP From 03082fdc09bf5548139e18338480ccee1a0d6efd Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 1 Dec 2020 01:25:08 +0100 Subject: [PATCH 42/47] ynh_normalize_url_path is for stuff from the pre-2.7 era ... --- scripts/upgrade | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index a2c9ad1..057aeea 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -73,18 +73,6 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# CHECK THE PATH -#================================================= - -# Normalize the URL path syntax -# N.B.: this is for app installations before YunoHost 2.7 -# where this value might be something like /foo/ or foo/ -# instead of /foo -# If nobody installed your app before 2.7, then you may -# safely remove this line -path_url=$(ynh_normalize_url_path --path_url=$path_url) - #================================================= # STANDARD UPGRADE STEPS #================================================= From abddc7d868b1cb4d4966a7c2eff7dcce6f00bb4b Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 4 Dec 2020 09:58:29 +0100 Subject: [PATCH 43/47] Small typos --- scripts/install | 2 +- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 6a82d9f..6d0c568 100755 --- a/scripts/install +++ b/scripts/install @@ -301,7 +301,7 @@ ynh_script_progression --message="Integrating service in YunoHost..." --time --w ### - As well as the section "INTEGRATE SERVICE IN YUNOHOST" in the restore script ### - And the section "INTEGRATE SERVICE IN YUNOHOST" in the upgrade script -yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log" +yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" ### Additional options starting with 3.8: ### diff --git a/scripts/restore b/scripts/restore index dbb172f..c334a77 100755 --- a/scripts/restore +++ b/scripts/restore @@ -122,7 +122,7 @@ systemctl enable $app.service --quiet #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1 -yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log" +yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/upgrade b/scripts/upgrade index 057aeea..6e61d9f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -174,7 +174,7 @@ ynh_use_logrotate --non-append #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --time --weight=1 -yunohost service add $app --description "A short description of the app" --log "/var/log/$app/$app.log" +yunohost service add $app --description="A short description of the app" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE From 028484bc25d4f77c18c1839eccba3c60a647592a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 4 Dec 2020 12:03:07 +0100 Subject: [PATCH 44/47] Update remove --- scripts/remove | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/remove b/scripts/remove index 0bb92f5..377c69f 100755 --- a/scripts/remove +++ b/scripts/remove @@ -28,7 +28,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) # REMOVE SERVICE INTEGRATION IN YUNOHOST #================================================= -# Remove the service from the list of services known by Yunohost (added from `yunohost service add`) +# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null then ynh_script_progression --message="Removing $app service integration..." --time --weight=1 From 23cde8ba9e6e1923f32adf5e242313567ca9cad0 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 4 Dec 2020 18:54:08 +0100 Subject: [PATCH 45/47] Remove commented/outdated test --- check_process.default | 2 -- 1 file changed, 2 deletions(-) diff --git a/check_process.default b/check_process.default index 97a2bc5..55dbb29 100644 --- a/check_process.default +++ b/check_process.default @@ -23,8 +23,6 @@ upgrade=1 from_commit=CommitHash backup_restore=1 multi_instance=1 - # This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version. - # incorrect_path=1 port_already_use=0 change_url=1 ;;; Levels From a01520f5097c9b1f4de7c1ff457aa96fa34b951b Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 4 Dec 2020 18:55:58 +0100 Subject: [PATCH 46/47] Remove that stuff about level 5 ... this ain't useful for any app, it's not like we're going to disable the linter entirely. At best we might want to disable some super specific test (historically this feature was kinda relevant because the linter was unreliable, but things improved since then) --- check_process.default | 3 --- 1 file changed, 3 deletions(-) diff --git a/check_process.default b/check_process.default index 55dbb29..41888cb 100644 --- a/check_process.default +++ b/check_process.default @@ -25,9 +25,6 @@ multi_instance=1 port_already_use=0 change_url=1 -;;; Levels - # If the level 5 (Package linter) is forced to 1. Please add justifications here. - Level 5=auto ;;; Options Email= Notification=none From 4dbc19777d078c7b3115d7f11bf4a628d8ab5ad4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 10 Dec 2020 11:27:00 +0100 Subject: [PATCH 47/47] Use SVG badge --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3af82e0..fb6c89c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ # Example app for YunoHost [![Integration level](https://dash.yunohost.org/integration/REPLACEBYYOURAPP.svg)](https://dash.yunohost.org/appci/app/REPLACEBYYOURAPP) ![](https://ci-apps.yunohost.org/ci/badges/REPLACEBYYOURAPP.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/REPLACEBYYOURAPP.maintain.svg) -[![Install REPLACEBYYOURAPP with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=REPLACEBYYOURAPP) +[![Install REPLACEBYYOURAPP with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=REPLACEBYYOURAPP) *[Lire ce readme en français.](./README_fr.md)* diff --git a/README_fr.md b/README_fr.md index 20b47cb..d7d410c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,7 +1,7 @@ # App exemple pour YunoHost [![Niveau d'intégration](https://dash.yunohost.org/integration/REPLACEBYYOURAPP.svg)](https://dash.yunohost.org/appci/app/REPLACEBYYOURAPP) ![](https://ci-apps.yunohost.org/ci/badges/REPLACEBYYOURAPP.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/REPLACEBYYOURAPP.maintain.svg) -[![Installer REPLACEBYYOURAPP avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=REPLACEBYYOURAPP) +[![Installer REPLACEBYYOURAPP avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=REPLACEBYYOURAPP) *[Read this readme in english.](./README.md)*