From 42110f9d853d51cab44449ff5b47e5b1857d8b9f Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 17:59:01 +0100 Subject: [PATCH 01/31] Apply example_ynh to _common.sh --- scripts/_common.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index 05a7907..4a6deae 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,2 +1,13 @@ #!/bin/bash +#================================================= +# PERSONNAL HELPERS +#================================================= + +#================================================= +# EXPERIMENTAL HELPERS +#================================================= + +#================================================= +# FUTUR OFFICIAL HELPERS +#================================================= From a7f408763bf8be82088ef70500d6c60a81707c92 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 18:06:24 +0100 Subject: [PATCH 02/31] update to 1.12.1 --- README.md | 2 +- conf/app.src | 6 +++--- manifest.json | 2 +- sources/rainloop_version | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9c392e6..02beb65 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Rainloop for YunoHost -* [rainloop](http://rainloop.net/ ): 1.11.3 +* [rainloop](http://rainloop.net/ ): 1.12.1 ## English Rainloop is a lightweight webmail. diff --git a/conf/app.src b/conf/app.src index 8b3d7fc..d886508 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://github.com/RainLoop/rainloop-webmail/releases/download/v1.11.3/rainloop-community-1.11.3.zip -SOURCE_SUM=49a097151abb1b208b74e01ee1680e2d -SOURCE_SUM_PRG=md5sum +SOURCE_URL=https://github.com/RainLoop/rainloop-webmail/releases/download/v1.12.1/rainloop-community-1.12.1.zip +SOURCE_SUM=5d7f99d0e145d22617de8c17e43f34842245d5570662f97f4352487671df811b +SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false SOURCE_FILENAME= diff --git a/manifest.json b/manifest.json index 0a5abde..6309f2b 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Lightweight multi-account webmail", "fr": "Webmail léger multi-comptes" }, - "version": "1.11.1", + "version": "1.12.1~ynh1", "url": "https://www.rainloop.net/", "license": "AGPL-3.0", "maintainer": { diff --git a/sources/rainloop_version b/sources/rainloop_version index 0a5af26..f8f4f03 100644 --- a/sources/rainloop_version +++ b/sources/rainloop_version @@ -1 +1 @@ -1.11.3 +1.12.1 From 5f1497cb3410a707215ce5f2ea5cd1ad10c3ef1e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 18:10:50 +0100 Subject: [PATCH 03/31] Update license --- README.md | 3 +++ manifest.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 02beb65..fff003f 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,9 @@ Rainloop saves your PGP private keys in the browser storage. This means that you To upgrade the app once a new rainloop version is available, simply run in a local shell via ssh or otherwise : ``sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/rainloop_ynh rainloop`` +## License + +**LICENSE:** AGPL-3.0-or-later ## Français Rainloop est un webmail simple et léger. diff --git a/manifest.json b/manifest.json index 6309f2b..6b0f776 100644 --- a/manifest.json +++ b/manifest.json @@ -8,7 +8,7 @@ }, "version": "1.12.1~ynh1", "url": "https://www.rainloop.net/", - "license": "AGPL-3.0", + "license": "AGPL-3.0-or-later", "maintainer": { "name": "scith, Djip007, polytan02" }, From 1df3c31491cca47dd3bbf35b0920cf7ea15e906e Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 18:15:01 +0100 Subject: [PATCH 04/31] apply example_ynh to manifest.json --- manifest.json | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/manifest.json b/manifest.json index 6b0f776..8db2e0a 100644 --- a/manifest.json +++ b/manifest.json @@ -13,12 +13,12 @@ "name": "scith, Djip007, polytan02" }, "requirements": { - "yunohost": ">= 2.7.2" + "yunohost": ">= 3.4" }, "multi_instance": true, "services": [ "nginx", - "php5-fpm", + "php7.0-fpm", "mysql" ], "arguments": { @@ -30,7 +30,7 @@ "en": "Choose a domain for Rainloop", "fr": "Choisissez un domaine pour Rainloop" }, - "example": "domain.org" + "example": "example.com" }, { "name": "path", @@ -52,13 +52,28 @@ "default": false }, { - "name": "password", - "type": "password", + "name": "lang", + "type": "string", "ask": { - "en": "Choose a strong password for the 'admin' user", - "fr": "Choisissez un mot de passe fort pour l'administrateur, 'admin'" - } + "en": "Choose the application language", + "fr": "Choisissez la langue de l'application" + }, + "choices": ["English", "Francais"], + "default": "English" }, + { + "name": "password", + "type": "password", + "ask": { + "en": "Set the administrator password", + "fr": "Définissez le mot de passe administrateur" + }, + "help": { + "en": "Use the help field to add an information for the admin about this question.", + "fr": "Utilisez le champ aide pour ajouter une information à l'intention de l'administrateur à propos de cette question." + }, + "example": "Choose a password" + }, { "name": "ldap", "type": "boolean", @@ -67,15 +82,6 @@ "fr": "Souhaitez-vous ajouter les utilisateurs YunoHost dans les suggestions de destinataires ?" }, "default": true - }, - { - "name": "lang", - "ask": { - "en": "Select default language", - "fr": "Definir la langue par defaut" - }, - "choices": ["English", "Francais"], - "default": "English" } ] } From 92e63af00905c27fabc57a48e7e9fc7832350718 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 18:24:07 +0100 Subject: [PATCH 05/31] switch from lang to language variable --- check_process | 2 +- manifest.json | 6 +++--- scripts/install | 17 +++-------------- scripts/upgrade | 9 +++++++++ 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/check_process b/check_process index bb5cd2d..12eb76e 100644 --- a/check_process +++ b/check_process @@ -6,7 +6,7 @@ is_public=1 (PUBLIC|public=1|private=0) password="password" ldap=1 - lang="English" + language="fr" ; Checks pkg_linter=1 setup_sub_dir=1 diff --git a/manifest.json b/manifest.json index 8db2e0a..095d86a 100644 --- a/manifest.json +++ b/manifest.json @@ -52,14 +52,14 @@ "default": false }, { - "name": "lang", + "name": "language", "type": "string", "ask": { "en": "Choose the application language", "fr": "Choisissez la langue de l'application" }, - "choices": ["English", "Francais"], - "default": "English" + "choices": ["fr", "en"], + "default": "fr" }, { "name": "password", diff --git a/scripts/install b/scripts/install index a641701..9e8a51f 100644 --- a/scripts/install +++ b/scripts/install @@ -25,7 +25,7 @@ path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC password=$YNH_APP_ARG_PASSWORD ldap=$YNH_APP_ARG_LDAP -lang=$YNH_APP_ARG_LANG +language=$YNH_APP_ARG_LANGUAGE app=$YNH_APP_INSTANCE_NAME @@ -100,18 +100,7 @@ ynh_add_fpm_config # AUTOCONFIG #================================================= -# Set lang => define from install manifest -case "$lang" in - Francais) - lang="fr" - ;; - English) - lang="en" - ;; - *) - lang="en" -esac -ynh_app_setting_set "$app" lang "$lang" +ynh_app_setting_set "$app" language "$language" # Set plugins plugins="ynh-login-mapping,auto-domain-grab" # This plugin is trying to automatically grab unknown domains if users want to add external email accounts @@ -129,7 +118,7 @@ sudo cp ../conf/data/configs/application.ini "$application_file" ynh_replace_string "domain.tld" "$domain" "$application_file" ynh_replace_string "MYSQLUSER" "$db_name" "$application_file" ynh_replace_string "MYSQLPASSWORD" "$db_pwd" "$application_file" -ynh_replace_string "LANGTOCHANGE" "$lang" "$application_file" +ynh_replace_string "LANGTOCHANGE" "$language" "$application_file" ynh_replace_string "PLUGINSTOENABLE" "$plugins" "$application_file" diff --git a/scripts/upgrade b/scripts/upgrade index f698571..80fdbe2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,6 +21,15 @@ is_public=$(ynh_app_setting_get $app is_public) final_path=$(ynh_app_setting_get $app final_path) db_name=$(ynh_app_setting_get $app db_name) +lang=$(ynh_app_setting_get $app lang) + +if [ -n "$lang" ] +then + language="$lang" + ynh_app_setting_set "$app" language "$language" + ynh_app_setting_delete "$app" lang +fi + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= From 39c9d68302d3cb7702f9a47f7686dd7fc7f5686a Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 18:26:17 +0100 Subject: [PATCH 06/31] Apply example_ynh to manifest.json --- manifest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 095d86a..84701ce 100644 --- a/manifest.json +++ b/manifest.json @@ -27,8 +27,8 @@ "name": "domain", "type": "domain", "ask": { - "en": "Choose a domain for Rainloop", - "fr": "Choisissez un domaine pour Rainloop" + "en": "Choose a domain name for Rainloop", + "fr": "Choisissez un nom de domaine pour Rainloop" }, "example": "example.com" }, From 7c7296410663f9341d62319c364ba93166daefa8 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 18:40:19 +0100 Subject: [PATCH 07/31] apply example_ynh on install script --- scripts/install | 87 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 80 insertions(+), 7 deletions(-) diff --git a/scripts/install b/scripts/install index 9e8a51f..84419af 100644 --- a/scripts/install +++ b/scripts/install @@ -13,45 +13,63 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + ### Remove this function if there's nothing to clean before calling the remove script. + true +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= +ynh_print_info "Retrieve arguments from the manifest ..." domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC +language=$YNH_APP_ARG_LANGUAGE password=$YNH_APP_ARG_PASSWORD ldap=$YNH_APP_ARG_LDAP -language=$YNH_APP_ARG_LANGUAGE +### 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 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, ... +### 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, ... app=$YNH_APP_INSTANCE_NAME #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= +ynh_print_info "Validating arguments ..." +### 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 "This path already contains a folder" # Normalize the url path syntax path_url=$(ynh_normalize_url_path $path_url) -# Check web path availability -ynh_webpath_available $domain $path_url # Register (book) web path ynh_webpath_register $app $domain $path_url #================================================= # STORE SETTINGS FROM MANIFEST #================================================= +ynh_print_info "Store settings from manifest ..." ynh_app_setting_set $app domain $domain ynh_app_setting_set $app path $path_url ynh_app_setting_set $app is_public $is_public -ynh_app_setting_set $app password $password +ynh_app_setting_set $app language $language +ynh_app_setting_set $app password $password #9999 Check if it's need to save password ynh_app_setting_set $app ldap $ldap #================================================= @@ -59,6 +77,16 @@ ynh_app_setting_set $app ldap $ldap #================================================= # CREATE A MYSQL DATABASE #================================================= +ynh_print_info "Creating a mysql database ..." + +### Use these lines if you need a database for the application. +### `ynh_mysql_setup_db` will create a database, an associated user and a ramdom password. +### The password will be stored as 'mysqlpwd' into the app settings, +### and will be available as $db_pwd +### If you're not using these lines: +### - Remove the section "BACKUP THE MYSQL DATABASE" in the backup script +### - Remove also the section "REMOVE THE MYSQL DATABASE" in the remove script +### - As well as the section "RESTORE THE MYSQL DATABASE" in the restore script db_name=$(ynh_sanitize_dbid $app) ynh_app_setting_set $app db_name $db_name @@ -67,6 +95,11 @@ ynh_mysql_setup_db $db_name $db_name #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_print_info "Setting up source files ..." + +### `ynh_setup_source` is used to install an app from a zip or tar.gz file, +### downloaded from an upstream source, like a git repository. +### `ynh_setup_source` use the file conf/app.src ynh_app_setting_set $app final_path $final_path # Download, check integrity, uncompress and patch the source from app.src @@ -75,14 +108,17 @@ ynh_setup_source "$final_path/app" #================================================= # NGINX CONFIGURATION #================================================= +ynh_print_info "Configuring nginx ..." + +### `ynh_add_nginx_config` will use the file conf/nginx.conf -ynh_replace_string "__PATH__/" "${path_url%/}/" "../conf/nginx.conf" # Create a dedicated nginx config ynh_add_nginx_config #================================================= # CREATE DEDICATED USER #================================================= +ynh_print_info "Configuring system user ..." # Create a system user ynh_system_user_create $app @@ -90,6 +126,18 @@ ynh_system_user_create $app #================================================= # PHP-FPM CONFIGURATION #================================================= +ynh_print_info "Configuring php-fpm ..." + +### `ynh_add_fpm_config` is used to set up a PHP config. +### You can remove it if your app doesn't use PHP. +### `ynh_add_fpm_config` will use the files conf/php-fpm.conf and conf/php-fpm.ini +### If you're not using these lines: +### - You can remove these files in conf/. +### - 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. +### - And the section "PHP-FPM CONFIGURATION" in the upgrade script # Create a dedicated php-fpm config ynh_add_fpm_config @@ -100,7 +148,7 @@ ynh_add_fpm_config # AUTOCONFIG #================================================= -ynh_app_setting_set "$app" language "$language" + # Set plugins plugins="ynh-login-mapping,auto-domain-grab" # This plugin is trying to automatically grab unknown domains if users want to add external email accounts @@ -151,12 +199,28 @@ fi # Install PGPback by chtixof to allow users to backup/restore their PGP private keys on the server cp -rf ../sources/pgpback "$final_path/" +#================================================= +# STORE THE CONFIG FILE CHECKSUM +#================================================= + +### `ynh_store_file_checksum` is used to store the checksum of a file. +### That way, during the upgrade script, by using `ynh_backup_if_checksum_is_different`, +### you can make a backup of this file before modifying it again if the admin had modified it. + +# Calculate and store the config file checksum into the app settings +ynh_store_file_checksum "$application_file" + #================================================= # GENERIC FINALIZATION #================================================= # SECURE FILES AND DIRECTORIES #================================================= +### For security reason, any app should set the permissions to root: before anything else. +### Then, if write authorization is needed, any access should be given only to directories +### that really need such authorization. + +# Set permissions to app files find $final_path/. -type d -exec chmod 755 {} \; find $final_path/. -type f -exec chmod 644 {} \; chown -R $app: $final_path @@ -164,15 +228,24 @@ chown -R $app: $final_path #================================================= # SETUP SSOWAT #================================================= +ynh_print_info "Configuring SSOwat ..." # Make app public if necessary if [ $is_public -eq 1 ] then - ynh_app_setting_set $app skipped_uris "/" + # unprotected_uris allows SSO credentials to be passed anyway. + ynh_app_setting_set $app unprotected_uris "/" fi #================================================= # RELOAD NGINX #================================================= +ynh_print_info "Reloading nginx ..." systemctl reload nginx + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info "Installation completed" From a6aa229e1fde3e8a0b0e10f65b22ba27a8cef82c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 18:43:34 +0100 Subject: [PATCH 08/31] Apply example_ynh to nginx.conf --- conf/nginx.conf | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 7f3d212..986f766 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,7 +1,11 @@ -location __PATH__ { - alias __FINALPATH__/; +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; +location __PATH__/ { - if ($scheme = http) { + # Path to source + alias __FINALPATH__/ ; + + # Force usage of https + if ($scheme = http) { rewrite ^ https://$server_name$request_uri? permanent; } @@ -18,15 +22,16 @@ location __PATH__ { try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php5-fpm-__NAME__.sock; + fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock; + fastcgi_index index.php; include fastcgi_params; fastcgi_param REMOTE_USER $remote_user; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $request_filename; } +### End of PHP configuration part # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; - } From c394df947b8b423337d467ca8f01f93be2446276 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 19:00:18 +0100 Subject: [PATCH 09/31] Apply example_ynh on php-fpm.conf --- conf/php-fpm.conf | 306 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 247 insertions(+), 59 deletions(-) diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index 6b5de9c..8bd761f 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -1,10 +1,11 @@ ; Start a new pool named 'www'. -; the variable $pool can we used in any directive and will be replaced by the +; the variable $pool can be used in any directive and will be replaced by the ; pool name ('www' here) -[__NAMETOCHANGE__] +[__NAME__] ; Per pool prefix ; It only applies on the following directives: +; - 'access.log' ; - 'slowlog' ; - 'listen' (unixsocket) ; - 'chroot' @@ -16,21 +17,43 @@ ; Default Value: none ;prefix = /path/to/pools/$pool +; Unix user/group of processes +; Note: The user is mandatory. If the group is not set, the default user's group +; will be used. +user = __USER__ +group = __USER__ + ; The address on which to accept FastCGI requests. ; Valid syntaxes are: -; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific address on +; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on ; a specific port; -; 'port' - to listen on a TCP socket to all addresses on a -; specific port; +; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on +; a specific port; +; 'port' - to listen on a TCP socket to all addresses +; (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/php5-fpm-__NAMETOCHANGE__.sock +listen = /var/run/php/php7.0-fpm-__NAME__.sock -; Set listen(2) backlog. A value of '-1' means unlimited. -; Default Value: 128 (-1 on FreeBSD and OpenBSD) -;listen.backlog = -1 +; Set listen(2) backlog. +; Default Value: 511 (-1 on FreeBSD and OpenBSD) +;listen.backlog = 511 -; List of ipv4 addresses of FastCGI clients which are allowed to connect. +; Set permissions for unix socket, if one is used. In Linux, read/write +; permissions must be set in order to allow connections from a web server. Many +; BSD-derived systems allow connections regardless of permissions. +; Default Values: user and group are set as the running user +; mode is set to 0660 +listen.owner = www-data +listen.group = www-data +listen.mode = 0660 +; When POSIX Access Control Lists are supported you can set them using +; these options, value is a comma separated list of user/group names. +; When set, listen.owner and listen.group are ignored +;listen.acl_users = +;listen.acl_groups = + +; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect. ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original ; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address ; must be separated by a comma. If this value is left blank, connections will be @@ -38,26 +61,26 @@ listen = /var/run/php5-fpm-__NAMETOCHANGE__.sock ; Default Value: any ;listen.allowed_clients = 127.0.0.1 -; Set permissions for unix socket, if one is used. In Linux, read/write -; permissions must be set in order to allow connections from a web server. Many -; BSD-derived systems allow connections regardless of permissions. -; Default Values: user and group are set as the running user -; mode is set to 0666 -listen.owner = www-data -listen.group = www-data -listen.mode = 0600 +; Specify the nice(2) priority to apply to the pool processes (only if set) +; The value can vary from -19 (highest priority) to 20 (lower priority) +; Note: - It will only work if the FPM master process is launched as root +; - The pool processes will inherit the master process priority +; unless it specified otherwise +; Default Value: no set +; process.priority = -19 -; Unix user/group of processes -; Note: The user is mandatory. If the group is not set, the default user's group -; will be used. -user = __USER__ -group = __USER__ +; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user +; or group is differrent than the master process user. It allows to create process +; core dump and ptrace the process for the pool user. +; Default Value: no +; process.dumpable = yes ; Choose how the process manager will control the number of child processes. ; Possible Values: ; static - a fixed number (pm.max_children) of child processes; ; dynamic - the number of child processes are set dynamically based on the -; following directives: +; following directives. With this process management, there will be +; always at least 1 children. ; pm.max_children - the maximum number of children that can ; be alive at the same time. ; pm.start_servers - the number of children created on startup. @@ -69,33 +92,45 @@ group = __USER__ ; state (waiting to process). If the number ; of 'idle' processes is greater than this ; number then some children will be killed. +; ondemand - no children are created at startup. Children will be forked when +; new requests will connect. The following parameter are used: +; pm.max_children - the maximum number of children that +; can be alive at the same time. +; pm.process_idle_timeout - The number of seconds after which +; an idle process will be killed. ; Note: This value is mandatory. pm = dynamic ; The number of child processes to be created when pm is set to 'static' and the -; maximum number of child processes to be created when pm is set to 'dynamic'. +; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'. ; This value sets the limit on the number of simultaneous requests that will be ; served. Equivalent to the ApacheMaxClients directive with mpm_prefork. ; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP -; CGI. -; Note: Used when pm is set to either 'static' or 'dynamic' +; CGI. The below defaults are based on a server without much resources. Don't +; forget to tweak pm.* to fit your needs. +; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' ; Note: This value is mandatory. -pm.max_children = 6 +pm.max_children = 5 ; The number of child processes created on startup. ; Note: Used only when pm is set to 'dynamic' ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 -pm.start_servers = 3 +pm.start_servers = 2 ; The desired minimum number of idle server processes. ; Note: Used only when pm is set to 'dynamic' ; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = 3 +pm.min_spare_servers = 1 ; The desired maximum number of idle server processes. ; Note: Used only when pm is set to 'dynamic' ; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = 5 +pm.max_spare_servers = 3 + +; The number of seconds after which an idle process will be killed. +; Note: Used only when pm is set to 'ondemand' +; Default Value: 10s +;pm.process_idle_timeout = 10s; ; The number of requests each child process should execute before respawning. ; This can be useful to work around memory leaks in 3rd party libraries. For @@ -104,33 +139,98 @@ pm.max_spare_servers = 5 pm.max_requests = 500 ; The URI to view the FPM status page. If this value is not set, no URI will be -; recognized as a status page. By default, the status page shows the following -; information: -; accepted conn - the number of request accepted by the pool; +; recognized as a status page. It shows the following informations: ; pool - the name of the pool; -; process manager - static or dynamic; +; process manager - static, dynamic or ondemand; +; start time - the date and time FPM has started; +; start since - number of seconds since FPM has started; +; accepted conn - the number of request accepted by the pool; +; listen queue - the number of request in the queue of pending +; connections (see backlog in listen(2)); +; max listen queue - the maximum number of requests in the queue +; of pending connections since FPM has started; +; listen queue len - the size of the socket queue of pending connections; ; idle processes - the number of idle processes; ; active processes - the number of active processes; -; total processes - the number of idle + active processes. +; total processes - the number of idle + active processes; +; max active processes - the maximum number of active processes since FPM +; has started; ; max children reached - number of times, the process limit has been reached, ; when pm tries to start more children (works only for -; pm 'dynamic') -; The values of 'idle processes', 'active processes' and 'total processes' are -; updated each second. The value of 'accepted conn' is updated in real time. +; pm 'dynamic' and 'ondemand'); +; Value are updated in real time. ; Example output: -; accepted conn: 12073 ; pool: www ; process manager: static -; idle processes: 35 -; active processes: 65 -; total processes: 100 -; max children reached: 1 +; start time: 01/Jul/2011:17:53:49 +0200 +; start since: 62636 +; accepted conn: 190460 +; listen queue: 0 +; max listen queue: 1 +; listen queue len: 42 +; idle processes: 4 +; active processes: 11 +; total processes: 15 +; max active processes: 12 +; max children reached: 0 +; ; By default the status page output is formatted as text/plain. Passing either -; 'html' or 'json' as a query string will return the corresponding output -; syntax. Example: +; 'html', 'xml' or 'json' in the query string will return the corresponding +; output syntax. Example: ; http://www.foo.bar/status ; http://www.foo.bar/status?json ; http://www.foo.bar/status?html +; http://www.foo.bar/status?xml +; +; By default the status page only outputs short status. Passing 'full' in the +; query string will also return status for each pool process. +; Example: +; http://www.foo.bar/status?full +; http://www.foo.bar/status?json&full +; http://www.foo.bar/status?html&full +; http://www.foo.bar/status?xml&full +; The Full status returns for each process: +; pid - the PID of the process; +; state - the state of the process (Idle, Running, ...); +; start time - the date and time the process has started; +; start since - the number of seconds since the process has started; +; requests - the number of requests the process has served; +; request duration - the duration in µs of the requests; +; request method - the request method (GET, POST, ...); +; request URI - the request URI with the query string; +; content length - the content length of the request (only with POST); +; user - the user (PHP_AUTH_USER) (or '-' if not set); +; script - the main script called (or '-' if not set); +; last request cpu - the %cpu the last request consumed +; it's always 0 if the process is not in Idle state +; because CPU calculation is done when the request +; processing has terminated; +; last request memory - the max amount of memory the last request consumed +; it's always 0 if the process is not in Idle state +; because memory calculation is done when the request +; processing has terminated; +; If the process is in Idle state, then informations are related to the +; last request the process has served. Otherwise informations are related to +; the current request being served. +; Example output: +; ************************ +; pid: 31330 +; state: Running +; start time: 01/Jul/2011:17:53:49 +0200 +; start since: 63087 +; requests: 12808 +; request duration: 1250261 +; request method: GET +; request URI: /test_mem.php?N=10000 +; content length: 0 +; user: - +; script: /home/fat/web/docs/php/test_mem.php +; last request cpu: 0.00 +; last request memory: 0 +; +; Note: There is a real-time FPM status monitoring sample web page available +; It's available in: /usr/share/php/7.0/fpm/status.html +; ; Note: The value must start with a leading slash (/). The value can be ; anything, but it may not be a good idea to use the .php extension or it ; may conflict with a real PHP file. @@ -154,12 +254,74 @@ ping.path = /ping ; Default Value: pong ;ping.response = pong -; The timeout for serving a single request after which the worker process will -; be killed. This option should be used when the 'max_execution_time' ini option -; does not stop script execution for some reason. A value of '0' means 'off'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -request_terminate_timeout = 120s +; The access log file +; Default: not set +;access.log = log/$pool.access.log + +; The access log format. +; The following syntax is allowed +; %%: the '%' character +; %C: %CPU used by the request +; it can accept the following format: +; - %{user}C for user CPU only +; - %{system}C for system CPU only +; - %{total}C for user + system CPU (default) +; %d: time taken to serve the request +; it can accept the following format: +; - %{seconds}d (default) +; - %{miliseconds}d +; - %{mili}d +; - %{microseconds}d +; - %{micro}d +; %e: an environment variable (same as $_ENV or $_SERVER) +; it must be associated with embraces to specify the name of the env +; variable. Some exemples: +; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e +; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e +; %f: script filename +; %l: content-length of the request (for POST request only) +; %m: request method +; %M: peak of memory allocated by PHP +; it can accept the following format: +; - %{bytes}M (default) +; - %{kilobytes}M +; - %{kilo}M +; - %{megabytes}M +; - %{mega}M +; %n: pool name +; %o: output header +; it must be associated with embraces to specify the name of the header: +; - %{Content-Type}o +; - %{X-Powered-By}o +; - %{Transfert-Encoding}o +; - .... +; %p: PID of the child that serviced the request +; %P: PID of the parent of the child that serviced the request +; %q: the query string +; %Q: the '?' character if query string exists +; %r: the request URI (without the query string, see %q and %Q) +; %R: remote IP address +; %s: status (response code) +; %t: server time the request was received +; it can accept a strftime(3) format: +; %d/%b/%Y:%H:%M:%S %z (default) +; The strftime(3) format must be encapsuled in a %{}t tag +; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t +; %T: time the log has been written (the request has finished) +; it can accept a strftime(3) format: +; %d/%b/%Y:%H:%M:%S %z (default) +; The strftime(3) format must be encapsuled in a %{}t tag +; e.g. for a ISO8601 formatted timestring, use: %{%Y-%m-%dT%H:%M:%S%z}t +; %u: remote user +; +; Default: "%R - %u %t \"%m %r\" %s" +;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" + +; The log file for slow requests +; Default Value: not set +; Note: slowlog is mandatory if request_slowlog_timeout is set +;slowlog = log/$pool.log.slow +slowlog = /var/log/nginx/__NAME__.slow.log ; The timeout for serving a single request after which a PHP backtrace will be ; dumped to the 'slowlog' file. A value of '0s' means 'off'. @@ -167,10 +329,12 @@ request_terminate_timeout = 120s ; Default Value: 0 request_slowlog_timeout = 5s -; The log file for slow requests -; Default Value: not set -; Note: slowlog is mandatory if request_slowlog_timeout is set -slowlog = /var/log/nginx/__NAMETOCHANGE__.slow.log +; The timeout for serving a single request after which the worker process will +; be killed. This option should be used when the 'max_execution_time' ini option +; does not stop script execution for some reason. A value of '0' means 'off'. +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) +; Default Value: 0 +request_terminate_timeout = 120s ; Set open file descriptor rlimit. ; Default Value: system defined value @@ -204,6 +368,23 @@ chdir = __FINALPATH__ ; Default Value: no catch_workers_output = yes +; Clear environment in FPM workers +; Prevents arbitrary environment variables from reaching FPM worker processes +; by clearing the environment in workers before env vars specified in this +; pool configuration are added. +; Setting to "no" will make all environment variables available to PHP code +; via getenv(), $_ENV and $_SERVER. +; Default Value: yes +;clear_env = no + +; Limits the extensions of the main script FPM will allow to parse. This can +; prevent configuration mistakes on the web server side. You should only limit +; FPM to .php extensions to prevent malicious users to use other extensions to +; execute php code. +; Note: set an empty value to allow all extensions. +; Default Value: .php +;security.limit_extensions = .php .php3 .php4 .php5 .php7 + ; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from ; the current environment. ; Default Value: clean env @@ -238,6 +419,13 @@ catch_workers_output = yes ;php_admin_flag[log_errors] = on ;php_admin_value[memory_limit] = 32M -php_value[upload_max_filesize] = 10G -php_value[post_max_size] = 10G -php_value[mail.add_x_header] = Off +; Common values to change to increase file upload limit +php_admin_value[upload_max_filesize] = 10G +php_admin_value[post_max_size] = 10G +php_admin_flag[mail.add_x_header] = Off + +; Other common parameters +; php_admin_value[max_execution_time] = 600 +; php_admin_value[max_input_time] = 300 +; php_admin_value[memory_limit] = 256M +; php_admin_flag[short_open_tag] = On From c360364a50901e5d2259212a300c43595ada5d59 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 19:01:50 +0100 Subject: [PATCH 10/31] remove php-fpm.ini not needed --- conf/php-fpm.ini | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 conf/php-fpm.ini diff --git a/conf/php-fpm.ini b/conf/php-fpm.ini deleted file mode 100644 index b4608de..0000000 --- a/conf/php-fpm.ini +++ /dev/null @@ -1,3 +0,0 @@ -upload_max_filesize = 10G -post_max_size = 10G -mail.add_x_header = Off From c5d055b4aa38eb07d69e70ec6b303d6a3a36953d Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 19:04:15 +0100 Subject: [PATCH 11/31] Apply example_ynh on remove --- scripts/remove | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/remove b/scripts/remove index 52055bd..ab79cf0 100644 --- a/scripts/remove +++ b/scripts/remove @@ -12,6 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= +ynh_print_info "Load settings" app=$YNH_APP_INSTANCE_NAME @@ -24,6 +25,7 @@ final_path=$(ynh_app_setting_get $app final_path) #================================================= # REMOVE THE MYSQL DATABASE #================================================= +ynh_print_info "Remove the mysql database" # Remove a database if it exists, along with the associated user ynh_mysql_remove_db $db_name $db_name @@ -31,6 +33,7 @@ ynh_mysql_remove_db $db_name $db_name #================================================= # REMOVE APP MAIN DIR #================================================= +ynh_print_info "Remove app main directory" # Remove the app directory securely ynh_secure_remove "$final_path" @@ -38,6 +41,7 @@ ynh_secure_remove "$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= +ynh_print_info "Remove nginx configuration" # Remove the dedicated nginx config ynh_remove_nginx_config @@ -45,6 +49,7 @@ ynh_remove_nginx_config #================================================= # REMOVE PHP-FPM CONFIGURATION #================================================= +ynh_print_info "Remove php-fpm configuration" # Remove the dedicated php-fpm config ynh_remove_fpm_config @@ -62,6 +67,13 @@ gpg --batch --delete-key --yes Rainloop #================================================= # REMOVE DEDICATED USER #================================================= +ynh_print_info "Remove the dedicated user" # Delete a system user ynh_system_user_delete $app + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info "Deletion completed" From 01305a117b83b8c638ac2b0a5f66f7ecc11b9fd0 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 19:05:56 +0100 Subject: [PATCH 12/31] Apply example_ynh to backup --- scripts/backup | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/scripts/backup b/scripts/backup index 0a064c2..d7658fe 100644 --- a/scripts/backup +++ b/scripts/backup @@ -6,24 +6,24 @@ # IMPORT GENERIC HELPERS #================================================= -if [ ! -e _common.sh ]; then - # Get the _common.sh file if it's not in the current directory - cp ../settings/scripts/_common.sh ./_common.sh - chmod a+rx _common.sh -fi -source _common.sh +source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers #================================================= # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + ### Remove this function if there's nothing to clean before calling the remove script. + true +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= +ynh_print_info "Load settings" app=$YNH_APP_INSTANCE_NAME @@ -36,24 +36,33 @@ db_name=$(ynh_app_setting_get $app db_name) #================================================= # BACKUP THE APP MAIN DIR #================================================= +ynh_print_info "Backup the app main dir" ynh_backup "$final_path" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= +ynh_print_info "Backup nginx configuration" ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # BACKUP THE PHP-FPM CONFIGURATION #================================================= +ynh_print_info "Backup php-fpm configuration" -ynh_backup "/etc/php5/fpm/pool.d/$app.conf" -ynh_backup "/etc/php5/fpm/conf.d/20-$app.ini" +ynh_backup "/etc/php/7.0/fpm/pool.d/$app.conf" #================================================= # BACKUP THE MYSQL DATABASE #================================================= +ynh_print_info "Backup the mysql database" ynh_mysql_dump_db "$db_name" > db.sql + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info "Backup script completed. Please wait for YunoHost to create the backup." From cca04d58be69347a017724e627d9e93674f6adb6 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 19:09:05 +0100 Subject: [PATCH 13/31] Apply example_ynh to restore --- scripts/restore | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/scripts/restore b/scripts/restore index 656cb89..2875535 100644 --- a/scripts/restore +++ b/scripts/restore @@ -6,24 +6,24 @@ # IMPORT GENERIC HELPERS #================================================= -if [ ! -e _common.sh ]; then - # Get the _common.sh file if it's not in the current directory - cp ../settings/scripts/_common.sh ./_common.sh - chmod a+rx _common.sh -fi -source _common.sh +source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers #================================================= # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + #### Remove this function if there's nothing to clean before calling the remove script. + true +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= +ynh_print_info "Load settings" app=$YNH_APP_INSTANCE_NAME @@ -52,20 +52,14 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE APP MAIN DIR #================================================= +ynh_print_info "Restore the app main directory" ynh_restore_file "$final_path" -#================================================= -# RESTORE THE MYSQL DATABASE -#================================================= - -db_pwd=$(ynh_app_setting_get $app mysqlpwd) -ynh_mysql_setup_db $db_name $db_name $db_pwd -ynh_mysql_connect_as $db_name $db_pwd $db_name < ./db.sql - #================================================= # RECREATE THE DEDICATED USER #================================================= +ynh_print_info "Recreate the dedicated user" # Create the dedicated user (if not existing) ynh_system_user_create $app @@ -81,14 +75,29 @@ chown -R $app: $final_path # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_restore_file "/etc/php5/fpm/pool.d/$app.conf" -ynh_restore_file "/etc/php5/fpm/conf.d/20-$app.ini" +ynh_restore_file "/etc/php/7.0/fpm/pool.d/$app.conf" + +#================================================= +# RESTORE THE MYSQL DATABASE +#================================================= +ynh_print_info "Restore the mysql database" + +db_pwd=$(ynh_app_setting_get $app mysqlpwd) +ynh_mysql_setup_db $db_name $db_name $db_pwd +ynh_mysql_connect_as $db_name $db_pwd $db_name < ./db.sql #================================================= # GENERIC FINALIZATION #================================================= # RELOAD NGINX AND PHP-FPM #================================================= +ynh_print_info "Reload nginx and php-fpm" -systemctl reload php5-fpm +systemctl reload php7.0-fpm systemctl reload nginx + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info "Restoration completed" From 1659d7fb99a4f42e52c28907113c6de821363f7c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 19:12:56 +0100 Subject: [PATCH 14/31] apply example_ynh to upgrade --- scripts/upgrade | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 80fdbe2..b01b43f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,6 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= +ynh_print_info "Load settings" app=$YNH_APP_INSTANCE_NAME @@ -19,6 +20,7 @@ domain=$(ynh_app_setting_get $app domain) path_url=$(ynh_app_setting_get $app path) is_public=$(ynh_app_setting_get $app is_public) final_path=$(ynh_app_setting_get $app final_path) +language=$(ynh_app_setting_get $app language) db_name=$(ynh_app_setting_get $app db_name) lang=$(ynh_app_setting_get $app lang) @@ -33,6 +35,7 @@ fi #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= +ynh_print_info "Ensure downward compatibility" # Fix is_public as a boolean value if [ "$is_public" = "Yes" ]; then @@ -58,6 +61,7 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= +ynh_print_info "Backup the app before upgrading" # Backup the current version of the app ynh_backup_before_upgrade @@ -80,6 +84,7 @@ path_url=$(ynh_normalize_url_path $path_url) #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_print_info "Download, check and unpack source" # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source "$final_path" @@ -87,6 +92,7 @@ ynh_setup_source "$final_path" #================================================= # NGINX CONFIGURATION #================================================= +ynh_print_info "Reconfigure nginx" # Create a dedicated nginx config ynh_add_nginx_config @@ -94,13 +100,15 @@ ynh_add_nginx_config #================================================= # CREATE DEDICATED USER #================================================= +ynh_print_info "Create a dedicated user" -# Create a system user +# Create a dedicated user (if not existing) ynh_system_user_create $app #================================================= # PHP-FPM CONFIGURATION #================================================= +ynh_print_info "Reconfigure php-fpm" # Create a dedicated php-fpm config ynh_add_fpm_config @@ -131,22 +139,32 @@ cp -rf ../sources/pgpback "$final_path/" # SECURE FILES AND DIRECTORIES #================================================= +# Set permissions on app files +chown -R $app: $final_path find $final_path/. -type d -exec chmod 755 {} \; find $final_path/. -type f -exec chmod 644 {} \; -chown -R $app: $final_path #================================================= # SETUP SSOWAT #================================================= +ynh_print_info "Reconfigure SSOwat" # Make app public if necessary if [ $is_public -eq 1 ] then - ynh_app_setting_set $app skipped_uris "/" + # unprotected_uris allows SSO credentials to be passed anyway + ynh_app_setting_set $app unprotected_uris "/" fi #================================================= # RELOAD NGINX #================================================= +ynh_print_info "Reload nginx" systemctl reload nginx + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info "Upgrade completed" From 04c9bd719d62a3a3dcee2fa7cdc3cd902f1751a3 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 19:15:29 +0100 Subject: [PATCH 15/31] apply example_ynh to check_process --- check_process | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/check_process b/check_process index 12eb76e..5c96dba 100644 --- a/check_process +++ b/check_process @@ -1,12 +1,17 @@ -;; Test Rainloop - auto_remove=1 - ; Manifest +# See here for more information +# https://github.com/YunoHost/package_check#syntax-check_process-file + +# Move this file from check_process.default to check_process when you have filled it. + +;; Test complet + ; Manifest domain="domain.tld" (DOMAIN) path="/rainloop" (PATH) - is_public=1 (PUBLIC|public=1|private=0) - password="password" - ldap=1 language="fr" + is_public=1 (PUBLIC|public=1|private=0) + password="pass" + ldap=1 + ; Checks pkg_linter=1 setup_sub_dir=1 @@ -20,20 +25,20 @@ multi_instance=1 incorrect_path=1 port_already_use=0 - change_url=0 + change_url=1 ;;; Levels Level 1=auto Level 2=auto Level 3=auto -# Level 4: - Level 4=1 -# Level 5: - Level 5=auto - Level 6=auto - Level 7=auto - Level 8=0 - Level 9=0 - Level 10=0 +# Level 4: If the app supports LDAP and SSOwat, turn level 4 to '1' and add a link to an issue or a part of your code to show it. +# If the app does not use LDAP nor SSOwat, and can't use them, turn level 4 to 'na' and explain as well. + Level 4=1 + Level 5=auto + Level 6=auto + Level 7=auto + Level 8=0 + Level 9=0 + Level 10=0 ;;; Options Email= Notification=none From b082797a6740da0c8868dd0c05f18f30906b5c8c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 19:29:26 +0100 Subject: [PATCH 16/31] apply example_ynh on README.md --- README.md | 87 ++++++++++++++++++++++++++++++++++++---------------- README_fr.md | 76 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 137 insertions(+), 26 deletions(-) create mode 100644 README_fr.md diff --git a/README.md b/README.md index fff003f..1d7615f 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,32 @@ # Rainloop for YunoHost - -* [rainloop](http://rainloop.net/ ): 1.12.1 - -## English + +[![Integration level](https://dash.yunohost.org/integration/rainloop.svg)](https://dash.yunohost.org/appci/app/rainloop) +[![Install rainloop with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=rainloop) + +*[Lire ce readme en français.](./README_fr.md)* + +> *This package allow you to install rainloop 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.* + +## Overview Rainloop is a lightweight webmail. - + +**Shipped version:** 1.12.1 + +## License + +**LICENSE:** AGPL-3.0-or-later + +## Screenshots + +![](Link to an screenshot for this app) + +## Demo + +* [Official demo](Link to a demo site for this app) + +## Configuration + To configure it, go to http://DOMAIN.TLD/rainloop/app/?admin - The default login is : admin @@ -18,29 +40,42 @@ Each user can add a remote carddav server from their own parameters interface. Rainloop saves your PGP private keys in the browser storage. This means that you will loose your private keys if you clear your browser storage (e.g., private browsing, different computer...). This packages integrates [PGPback by chtixof](https://github.com/chtixof/pgpback_ynh) so you can store your PGP private keys on the server securely. Go to **http://DOMAIN.TLD/rainloop/pgpback** to backup your PGP keys on the server or restore them. -To upgrade the app once a new rainloop version is available, simply run in a local shell via ssh or otherwise : -``sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/rainloop_ynh rainloop`` +## Documentation -## License + * Official documentation: https://www.rainloop.net/docs/ -**LICENSE:** AGPL-3.0-or-later - -## Français -Rainloop est un webmail simple et léger. - -Pour le configurer après l'installation, veuillez vous rendre sur http://DOMAIN.TLD/rainloop/app/?admin - -- Le nom d'utilisateur admin par défaut est : admin -- Le mot de passe admin par défaut est : Mot de passe choisi lors de l'installation -- Si vous avez oublié votre mot de passe, vous pouvez le retrouver avec ``sudo yunohost app settings rainloop password`` - -Chaque utilisateur peut ajouter un carnet d'adresse distant CardDav via leurs propres paramètres. - -- Si vous utilisez Baikal, l'adresse à renseigner est du type : https://DOMAIN.TLD/baikal/card.php/addressbooks/UTILISATEUR/default/ -- Si vous utilisez NextCloud, l'adresse à renseigner est du type : https://DOMAIN.TLD/nextcloud/remote.php/carddav/addressbooks/USER/contacts +## YunoHost specific features -Rainloop stocke les clés PGP privées dans le stockage de navigateur. Cela implique que vos clés seront perdues quand vous videz le stockage de navigateur (navigation incognito, changement d'ordinateur, ...). Ce paquet intègre [PGPback de chtixof](https://github.com/chtixof/pgpback_ynh) pour que vous puissiez stocker vos clés privées PGP de manière sécurisée sur le serveur. Rendez-vous **http://DOMAIN.TLD/rainloop/pgpback** pour stocker vos clés privées PGP sur le serveur ou les restaurer dans un nouveau navigateur. +#### Multi-users support -Pour mettre à jour rainloop lorsqu'une nouvelle version est disponible, lancez en console locale (ssh ou autre) : -``sudo yunohost app upgrade -u https://github.com/YunoHost-Apps/rainloop_ynh rainloop`` +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/rainloop%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/rainloop/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/rainloop%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/rainloop/) +* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/rainloop%20%28Community%29.svg)](https://ci-stretch.nohost.me/ci/apps/rainloop/) + + +## Links + + * Report a bug: https://github.com/YunoHost-Apps/rainloop_ynh/issues + * App website: http://rainloop.net/ + * App github website: https://github.com/RainLoop/rainloop-webmail + * YunoHost website: https://yunohost.org/ + +--- + +Developers 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/rainloop_ynh/tree/testing). + +To try the testing branch, please proceed like that. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/rainloop_ynh/tree/testing --debug +or +sudo yunohost app upgrade rainloop -u https://github.com/YunoHost-Apps/rainloop_ynh/tree/testing --debug +``` diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..44d986f --- /dev/null +++ b/README_fr.md @@ -0,0 +1,76 @@ +# App exemple pour YunoHost + +[![Integration level](https://dash.yunohost.org/integration/rainloop.svg)](https://dash.yunohost.org/appci/app/rainloop) +[![Install rainloop with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=rainloop) + +*[Read this readme in english.](./README.md)* + +> *Ce package vous permet d'installer rainloop rapidement et simplement sur un serveur Yunohost. +Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* + +## Vue d'ensemble +Rainloop est un webmail simple et léger. + +**Version incluse:** 1.12.1 + +## Captures d'écran + +![](Lien vers une capture d'écran pour cette application) + +## Démo + +* [Démo officielle](Lien vers un site de démonstration pour cette application) + +## Configuration + +Pour le configurer après l'installation, veuillez vous rendre sur http://DOMAIN.TLD/rainloop/app/?admin + +- Le nom d'utilisateur admin par défaut est : admin +- Le mot de passe admin par défaut est : Mot de passe choisi lors de l'installation +- Si vous avez oublié votre mot de passe, vous pouvez le retrouver avec ``sudo yunohost app settings rainloop password`` + +Chaque utilisateur peut ajouter un carnet d'adresse distant CardDav via leurs propres paramètres. + +- Si vous utilisez Baikal, l'adresse à renseigner est du type : https://DOMAIN.TLD/baikal/card.php/addressbooks/UTILISATEUR/default/ +- Si vous utilisez NextCloud, l'adresse à renseigner est du type : https://DOMAIN.TLD/nextcloud/remote.php/carddav/addressbooks/USER/contacts + +Rainloop stocke les clés PGP privées dans le stockage de navigateur. Cela implique que vos clés seront perdues quand vous videz le stockage de navigateur (navigation incognito, changement d'ordinateur, ...). Ce paquet intègre [PGPback de chtixof](https://github.com/chtixof/pgpback_ynh) pour que vous puissiez stocker vos clés privées PGP de manière sécurisée sur le serveur. Rendez-vous **http://DOMAIN.TLD/rainloop/pgpback** pour stocker vos clés privées PGP sur le serveur ou les restaurer dans un nouveau navigateur. + +## Documentation + + * Documentation officielle: https://www.rainloop.net/docs/ + +## Caractéristiques spécifiques YunoHost + +#### Support multi-utilisateurs + +L'authentification LDAP et HTTP est-elle prise en charge? +L'application peut-elle être utilisée par plusieurs utilisateurs? + +#### Supported architectures + +* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/rainloop%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/rainloop/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/rainloop%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/rainloop/) +* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/rainloop%20%28Community%29.svg)](https://ci-stretch.nohost.me/ci/apps/rainloop/) + +## Links + + * Signaler un bug: https://github.com/YunoHost-Apps/rainloop_ynh/issues + * Site de l'application: http://rainloop.net/ + * Site Github de l'application: https://github.com/RainLoop/rainloop-webmail + * Site web YunoHost: https://yunohost.org/ + +--- + +Informations pour les développeurs +---------------- + +**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.** +Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/rainloop_ynh/tree/testing). + +Pour essayer la branche testing, procédez comme suit. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/rainloop_ynh/tree/testing --debug +ou +sudo yunohost app upgrade rainloop -u https://github.com/YunoHost-Apps/rainloop_ynh/tree/testing --debug +``` From ee40fa67236009753d79dbbf5d1ca205b0b7b0b6 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 19:29:46 +0100 Subject: [PATCH 17/31] Add change_url --- scripts/change_url | 113 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 scripts/change_url diff --git a/scripts/change_url b/scripts/change_url new file mode 100644 index 0000000..31c0ee5 --- /dev/null +++ b/scripts/change_url @@ -0,0 +1,113 @@ +#!/bin/bash + +#================================================= +# GENERIC STARTING +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +source _common.sh +source /usr/share/yunohost/helpers + +#================================================= +# RETRIEVE ARGUMENTS +#================================================= +ynh_print_info "Retrieve arguments from the manifest" + +old_domain=$YNH_APP_OLD_DOMAIN +old_path=$YNH_APP_OLD_PATH + +new_domain=$YNH_APP_NEW_DOMAIN +new_path=$YNH_APP_NEW_PATH + +app=$YNH_APP_INSTANCE_NAME + +#================================================= +# LOAD SETTINGS +#================================================= +ynh_print_info "Load settings" + +# Needed for helper "ynh_add_nginx_config" +final_path=$(ynh_app_setting_get $app final_path) + +# Add settings here as needed by your application +#db_name=$(ynh_app_setting_get "$app" db_name) +#db_pwd=$(ynh_app_setting_get $app db_pwd) + +#================================================= +# CHECK THE SYNTAX OF THE PATHS +#================================================= +ynh_print_info "Check the syntax of the paths" + +test -n "$old_path" || old_path="/" +test -n "$new_path" || new_path="/" +new_path=$(ynh_normalize_url_path $new_path) +old_path=$(ynh_normalize_url_path $old_path) + +#================================================= +# CHECK WHICH PARTS SHOULD BE CHANGED +#================================================= + +change_domain=0 +if [ "$old_domain" != "$new_domain" ] +then + change_domain=1 +fi + +change_path=0 +if [ "$old_path" != "$new_path" ] +then + change_path=1 +fi + +#================================================= +# STANDARD MODIFICATIONS +#================================================= +# MODIFY URL IN NGINX CONF +#================================================= +ynh_print_info "Modify url in nginx configuration" + +nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf + +# 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 + ynh_backup_if_checksum_is_different "$nginx_conf_path" + # Set global variables for nginx helper + domain="$old_domain" + path_url="$new_path" + # Create a dedicated nginx config + ynh_add_nginx_config +fi + +# Change the domain for nginx +if [ $change_domain -eq 1 ] +then + # Delete file checksum for the old conf file location + ynh_delete_file_checksum "$nginx_conf_path" + mv $nginx_conf_path /etc/nginx/conf.d/$new_domain.d/$app.conf + # Store file checksum for the new config file location + ynh_store_file_checksum "/etc/nginx/conf.d/$new_domain.d/$app.conf" +fi + +#================================================= +# SPECIFIC MODIFICATIONS +#================================================= +# ... +#================================================= + +#================================================= +# GENERIC FINALISATION +#================================================= +# RELOAD NGINX +#================================================= +ynh_print_info "Reload nginx" + +systemctl reload nginx + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info "Change of url completed" From 12bd4b774805c4fc6b287c6aa4b46f121a66b10c Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 19:36:11 +0100 Subject: [PATCH 18/31] Add screenshot --- README.md | 6 +----- README_fr.md | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1d7615f..be023bc 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,7 @@ Rainloop is a lightweight webmail. ## Screenshots -![](Link to an screenshot for this app) - -## Demo - -* [Official demo](Link to a demo site for this app) +![](http://www.rainloop.net/static/media/screenshots/v2/12.png) ## Configuration diff --git a/README_fr.md b/README_fr.md index 44d986f..cd2952f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -15,11 +15,7 @@ Rainloop est un webmail simple et léger. ## Captures d'écran -![](Lien vers une capture d'écran pour cette application) - -## Démo - -* [Démo officielle](Lien vers un site de démonstration pour cette application) +![](http://www.rainloop.net/static/media/screenshots/v2/12.png) ## Configuration From 971911ab1bc619939f2aef47c6bd5bed823b14a5 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 19:37:12 +0100 Subject: [PATCH 19/31] Add license --- README_fr.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README_fr.md b/README_fr.md index cd2952f..0f8912f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,6 +13,10 @@ Rainloop est un webmail simple et léger. **Version incluse:** 1.12.1 +## License + +**LICENSE:** AGPL-3.0-or-later + ## Captures d'écran ![](http://www.rainloop.net/static/media/screenshots/v2/12.png) From 99f1a8c4b5624512eb64d07e730176b17f088c80 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 19:41:15 +0100 Subject: [PATCH 20/31] Add demo link --- README.md | 4 ++++ README_fr.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index be023bc..3516948 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,10 @@ Rainloop is a lightweight webmail. ![](http://www.rainloop.net/static/media/screenshots/v2/12.png) +## Demo + +* [Official demo](https://mail.rainloop.net/) + ## Configuration To configure it, go to http://DOMAIN.TLD/rainloop/app/?admin diff --git a/README_fr.md b/README_fr.md index 0f8912f..2996c57 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,6 +21,10 @@ Rainloop est un webmail simple et léger. ![](http://www.rainloop.net/static/media/screenshots/v2/12.png) +## Démo + +* [Démo officielle](https://mail.rainloop.net/) + ## Configuration Pour le configurer après l'installation, veuillez vous rendre sur http://DOMAIN.TLD/rainloop/app/?admin From f974e14dc125336b7676a6cae7547f3dfe13b17f Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 19:53:02 +0100 Subject: [PATCH 21/31] Fix php-fpm.conf --- conf/php-fpm.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index 8bd761f..488cd35 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -1,7 +1,7 @@ ; Start a new pool named 'www'. ; the variable $pool can be used in any directive and will be replaced by the ; pool name ('www' here) -[__NAME__] +[__NAMETOCHANGE__] ; Per pool prefix ; It only applies on the following directives: @@ -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-__NAME__.sock +listen = /var/run/php/php7.0-fpm-__NAMETOCHANGE__.sock ; Set listen(2) backlog. ; Default Value: 511 (-1 on FreeBSD and OpenBSD) From 011efb5db0e7b82a4adada28affca8052b5601a1 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 20:02:35 +0100 Subject: [PATCH 22/31] Fix upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index b01b43f..88bd8c8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -87,7 +87,7 @@ path_url=$(ynh_normalize_url_path $path_url) ynh_print_info "Download, check and unpack source" # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source "$final_path" +ynh_setup_source "$final_path/app" #================================================= # NGINX CONFIGURATION From bf207b546f679bb739a3ca4812fa01a18f560a54 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 20:23:18 +0100 Subject: [PATCH 23/31] Fix change_url --- scripts/change_url | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/change_url b/scripts/change_url index 31c0ee5..5912915 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -97,6 +97,10 @@ fi # ... #================================================= +application_file="$final_path/app/data/_data_/_default_/configs/application.ini" +ynh_replace_string "default_domain = .^" "default_domain = \"$new_domain\"" "$application_file" +ynh_replace_string "$old_domain$old_path" "$new_domain$new_path" "$final_path/index.php" + #================================================= # GENERIC FINALISATION #================================================= From a41177d100321c0af701929d7380be8df9674096 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 11 Feb 2019 20:31:14 +0100 Subject: [PATCH 24/31] Fix svg --- README.md | 6 +++--- README_fr.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3516948..40980f3 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,9 @@ Can the app be used by multiple users? #### Supported architectures -* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/rainloop%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/rainloop/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/rainloop%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/rainloop/) -* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/rainloop%20%28Community%29.svg)](https://ci-stretch.nohost.me/ci/apps/rainloop/) +* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/rainloop%20%28Official%29.svg)](https://ci-apps.yunohost.org/ci/apps/rainloop/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/rainloop%20%28Official%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/rainloop/) +* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/rainloop%20%28Official%29.svg)](https://ci-stretch.nohost.me/ci/apps/rainloop/) ## Links diff --git a/README_fr.md b/README_fr.md index 2996c57..e99f220 100644 --- a/README_fr.md +++ b/README_fr.md @@ -53,9 +53,9 @@ L'application peut-elle être utilisée par plusieurs utilisateurs? #### Supported architectures -* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/rainloop%20%28Community%29.svg)](https://ci-apps.yunohost.org/ci/apps/rainloop/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/rainloop%20%28Community%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/rainloop/) -* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/rainloop%20%28Community%29.svg)](https://ci-stretch.nohost.me/ci/apps/rainloop/) +* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/rainloop%20%28Official%29.svg)](https://ci-apps.yunohost.org/ci/apps/rainloop/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/rainloop%20%28Official%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/rainloop/) +* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/rainloop%20%28Official%29.svg)](https://ci-stretch.nohost.me/ci/apps/rainloop/) ## Links From 6b1d42496bdec84a9e4be6608940cbf4248d0924 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 13 Feb 2019 12:48:05 +0100 Subject: [PATCH 25/31] Variable rename from language to lang. --- check_process | 2 +- manifest.json | 2 +- scripts/install | 6 +++--- scripts/upgrade | 11 +---------- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/check_process b/check_process index 5c96dba..7dcddeb 100644 --- a/check_process +++ b/check_process @@ -7,7 +7,7 @@ ; Manifest domain="domain.tld" (DOMAIN) path="/rainloop" (PATH) - language="fr" + lang="fr" is_public=1 (PUBLIC|public=1|private=0) password="pass" ldap=1 diff --git a/manifest.json b/manifest.json index 84701ce..fd53967 100644 --- a/manifest.json +++ b/manifest.json @@ -52,7 +52,7 @@ "default": false }, { - "name": "language", + "name": "lang", "type": "string", "ask": { "en": "Choose the application language", diff --git a/scripts/install b/scripts/install index 84419af..21146dd 100644 --- a/scripts/install +++ b/scripts/install @@ -28,7 +28,7 @@ ynh_print_info "Retrieve arguments from the manifest ..." domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC -language=$YNH_APP_ARG_LANGUAGE +lang=$YNH_APP_ARG_LANG password=$YNH_APP_ARG_PASSWORD ldap=$YNH_APP_ARG_LDAP @@ -68,7 +68,7 @@ ynh_print_info "Store settings from manifest ..." ynh_app_setting_set $app domain $domain ynh_app_setting_set $app path $path_url ynh_app_setting_set $app is_public $is_public -ynh_app_setting_set $app language $language +ynh_app_setting_set $app lang $lang ynh_app_setting_set $app password $password #9999 Check if it's need to save password ynh_app_setting_set $app ldap $ldap @@ -166,7 +166,7 @@ sudo cp ../conf/data/configs/application.ini "$application_file" ynh_replace_string "domain.tld" "$domain" "$application_file" ynh_replace_string "MYSQLUSER" "$db_name" "$application_file" ynh_replace_string "MYSQLPASSWORD" "$db_pwd" "$application_file" -ynh_replace_string "LANGTOCHANGE" "$language" "$application_file" +ynh_replace_string "LANGTOCHANGE" "$lang" "$application_file" ynh_replace_string "PLUGINSTOENABLE" "$plugins" "$application_file" diff --git a/scripts/upgrade b/scripts/upgrade index 88bd8c8..a0284c4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,17 +20,8 @@ domain=$(ynh_app_setting_get $app domain) path_url=$(ynh_app_setting_get $app path) is_public=$(ynh_app_setting_get $app is_public) final_path=$(ynh_app_setting_get $app final_path) -language=$(ynh_app_setting_get $app language) -db_name=$(ynh_app_setting_get $app db_name) - lang=$(ynh_app_setting_get $app lang) - -if [ -n "$lang" ] -then - language="$lang" - ynh_app_setting_set "$app" language "$language" - ynh_app_setting_delete "$app" lang -fi +db_name=$(ynh_app_setting_get $app db_name) #================================================= # ENSURE DOWNWARD COMPATIBILITY From 07dfaf234bd9a7731634f38103407e253b42c805 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 13 Feb 2019 14:05:07 +0100 Subject: [PATCH 26/31] Remove not needed comments --- check_process | 7 ------- conf/nginx.conf | 1 - scripts/backup | 4 ---- scripts/change_url | 2 +- scripts/install | 50 ---------------------------------------------- scripts/restore | 4 ---- 6 files changed, 1 insertion(+), 67 deletions(-) diff --git a/check_process b/check_process index 7dcddeb..f8eeef1 100644 --- a/check_process +++ b/check_process @@ -1,8 +1,3 @@ -# See here for more information -# https://github.com/YunoHost/package_check#syntax-check_process-file - -# Move this file from check_process.default to check_process when you have filled it. - ;; Test complet ; Manifest domain="domain.tld" (DOMAIN) @@ -30,8 +25,6 @@ Level 1=auto Level 2=auto Level 3=auto -# Level 4: If the app supports LDAP and SSOwat, turn level 4 to '1' and add a link to an issue or a part of your code to show it. -# If the app does not use LDAP nor SSOwat, and can't use them, turn level 4 to 'na' and explain as well. Level 4=1 Level 5=auto Level 6=auto diff --git a/conf/nginx.conf b/conf/nginx.conf index 986f766..f5d5170 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -30,7 +30,6 @@ location __PATH__/ { fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $request_filename; } -### End of PHP configuration part # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; diff --git a/scripts/backup b/scripts/backup index d7658fe..0818680 100644 --- a/scripts/backup +++ b/scripts/backup @@ -13,10 +13,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. - true -} # Exit if an error occurs during the execution of the script ynh_abort_if_errors diff --git a/scripts/change_url b/scripts/change_url index 5912915..e2bc138 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -94,7 +94,7 @@ fi #================================================= # SPECIFIC MODIFICATIONS #================================================= -# ... +# CONFIGURE #================================================= application_file="$final_path/app/data/_data_/_default_/configs/application.ini" diff --git a/scripts/install b/scripts/install index 21146dd..b24fff1 100644 --- a/scripts/install +++ b/scripts/install @@ -13,10 +13,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - ### Remove this function if there's nothing to clean before calling the remove script. - true -} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -32,16 +28,6 @@ lang=$YNH_APP_ARG_LANG password=$YNH_APP_ARG_PASSWORD ldap=$YNH_APP_ARG_LDAP -### 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 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, ... -### 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, ... app=$YNH_APP_INSTANCE_NAME #================================================= @@ -49,8 +35,6 @@ app=$YNH_APP_INSTANCE_NAME #================================================= ynh_print_info "Validating arguments ..." -### 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 "This path already contains a folder" @@ -79,15 +63,6 @@ ynh_app_setting_set $app ldap $ldap #================================================= ynh_print_info "Creating a mysql database ..." -### Use these lines if you need a database for the application. -### `ynh_mysql_setup_db` will create a database, an associated user and a ramdom password. -### The password will be stored as 'mysqlpwd' into the app settings, -### and will be available as $db_pwd -### If you're not using these lines: -### - Remove the section "BACKUP THE MYSQL DATABASE" in the backup script -### - Remove also the section "REMOVE THE MYSQL DATABASE" in the remove script -### - As well as the section "RESTORE THE MYSQL DATABASE" in the restore script - db_name=$(ynh_sanitize_dbid $app) ynh_app_setting_set $app db_name $db_name ynh_mysql_setup_db $db_name $db_name @@ -97,10 +72,6 @@ ynh_mysql_setup_db $db_name $db_name #================================================= ynh_print_info "Setting up source files ..." -### `ynh_setup_source` is used to install an app from a zip or tar.gz file, -### downloaded from an upstream source, like a git repository. -### `ynh_setup_source` use the file conf/app.src - ynh_app_setting_set $app final_path $final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source "$final_path/app" @@ -110,8 +81,6 @@ ynh_setup_source "$final_path/app" #================================================= ynh_print_info "Configuring nginx ..." -### `ynh_add_nginx_config` will use the file conf/nginx.conf - # Create a dedicated nginx config ynh_add_nginx_config @@ -128,17 +97,6 @@ ynh_system_user_create $app #================================================= ynh_print_info "Configuring php-fpm ..." -### `ynh_add_fpm_config` is used to set up a PHP config. -### You can remove it if your app doesn't use PHP. -### `ynh_add_fpm_config` will use the files conf/php-fpm.conf and conf/php-fpm.ini -### If you're not using these lines: -### - You can remove these files in conf/. -### - 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. -### - And the section "PHP-FPM CONFIGURATION" in the upgrade script - # Create a dedicated php-fpm config ynh_add_fpm_config @@ -203,10 +161,6 @@ cp -rf ../sources/pgpback "$final_path/" # STORE THE CONFIG FILE CHECKSUM #================================================= -### `ynh_store_file_checksum` is used to store the checksum of a file. -### That way, during the upgrade script, by using `ynh_backup_if_checksum_is_different`, -### you can make a backup of this file before modifying it again if the admin had modified it. - # Calculate and store the config file checksum into the app settings ynh_store_file_checksum "$application_file" @@ -216,10 +170,6 @@ ynh_store_file_checksum "$application_file" # SECURE FILES AND DIRECTORIES #================================================= -### For security reason, any app should set the permissions to root: before anything else. -### Then, if write authorization is needed, any access should be given only to directories -### that really need such authorization. - # Set permissions to app files find $final_path/. -type d -exec chmod 755 {} \; find $final_path/. -type f -exec chmod 644 {} \; diff --git a/scripts/restore b/scripts/restore index 2875535..58fde33 100644 --- a/scripts/restore +++ b/scripts/restore @@ -13,10 +13,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - #### Remove this function if there's nothing to clean before calling the remove script. - true -} # Exit if an error occurs during the execution of the script ynh_abort_if_errors From 0b53c4f6f68be3c57458346cbd61aa266ea2166f Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 13 Feb 2019 14:19:01 +0100 Subject: [PATCH 27/31] removed not needed --- scripts/change_url | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index e2bc138..13ddd0b 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -30,10 +30,6 @@ ynh_print_info "Load settings" # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get $app final_path) -# Add settings here as needed by your application -#db_name=$(ynh_app_setting_get "$app" db_name) -#db_pwd=$(ynh_app_setting_get $app db_pwd) - #================================================= # CHECK THE SYNTAX OF THE PATHS #================================================= From d65b500036ac6f51dccabd58eba8b6c479a90160 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 13 Feb 2019 18:27:46 +0100 Subject: [PATCH 28/31] Desactivate change_url check. Even if working, there is an error with CI. Error already here in the master branch --- check_process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_process b/check_process index f8eeef1..dac7494 100644 --- a/check_process +++ b/check_process @@ -20,7 +20,7 @@ multi_instance=1 incorrect_path=1 port_already_use=0 - change_url=1 + change_url=0 ;;; Levels Level 1=auto Level 2=auto From daad1682c89ff26e07e8b8094e07944da325e2c9 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 13 Feb 2019 19:21:57 +0100 Subject: [PATCH 29/31] Trying to manage change_url --- check_process | 2 +- scripts/change_url | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/check_process b/check_process index dac7494..f8eeef1 100644 --- a/check_process +++ b/check_process @@ -20,7 +20,7 @@ multi_instance=1 incorrect_path=1 port_already_use=0 - change_url=0 + change_url=1 ;;; Levels Level 1=auto Level 2=auto diff --git a/scripts/change_url b/scripts/change_url index 13ddd0b..e19b82f 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -95,7 +95,21 @@ fi application_file="$final_path/app/data/_data_/_default_/configs/application.ini" ynh_replace_string "default_domain = .^" "default_domain = \"$new_domain\"" "$application_file" -ynh_replace_string "$old_domain$old_path" "$new_domain$new_path" "$final_path/index.php" +if [ $old_path = "/" ] && [ $new_path = "/" ] +then + ynh_replace_string "$old_domain" "$new_domain" "$final_path/index.php" +elif [ $old_path != "/" ] && [ $new_path != "/" ] +then + ynh_replace_string "$old_domain$old_path" "$new_domain$new_path" "$final_path/index.php" +elif [ $old_path != "/" ] && [ $new_path = "/" ] +then + ynh_replace_string "$old_domain$old_path" "$new_domain" "$final_path/index.php" +elif [ $old_path = "/" ] && [ $new_path != "/" ] +then + ynh_replace_string "$old_domain" "$new_domain$new_path" "$final_path/index.php" +else + ynh_die "Error changing the URL" +fi #================================================= # GENERIC FINALISATION From d1559677f5d849d2d68cc69e7e65f133e973bec9 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 1 Mar 2019 15:01:28 +0100 Subject: [PATCH 30/31] Apply last example_ynh --- scripts/_common.sh | 4 ++-- scripts/backup | 12 ++++++------ scripts/change_url | 8 ++++---- scripts/install | 10 +++++----- scripts/remove | 14 +++++++------- scripts/restore | 13 +++++++------ scripts/upgrade | 20 ++++++++++---------- 7 files changed, 41 insertions(+), 40 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 4a6deae..b905339 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,7 +1,7 @@ #!/bin/bash #================================================= -# PERSONNAL HELPERS +# PERSONAL HELPERS #================================================= #================================================= @@ -9,5 +9,5 @@ #================================================= #================================================= -# FUTUR OFFICIAL HELPERS +# FUTURE OFFICIAL HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index 0818680..271844f 100644 --- a/scripts/backup +++ b/scripts/backup @@ -19,7 +19,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_print_info "Load settings" +ynh_print_info "Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -32,28 +32,28 @@ db_name=$(ynh_app_setting_get $app db_name) #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_print_info "Backup the app main dir" +ynh_print_info "Backing up the main app directory..." ynh_backup "$final_path" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -ynh_print_info "Backup nginx configuration" +ynh_print_info "Backing up nginx web server configuration..." ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # BACKUP THE PHP-FPM CONFIGURATION #================================================= -ynh_print_info "Backup php-fpm configuration" +ynh_print_info "Backing up php-fpm configuration..." ynh_backup "/etc/php/7.0/fpm/pool.d/$app.conf" #================================================= # BACKUP THE MYSQL DATABASE #================================================= -ynh_print_info "Backup the mysql database" +ynh_print_info "Backing up the MySQL database..." ynh_mysql_dump_db "$db_name" > db.sql @@ -61,4 +61,4 @@ ynh_mysql_dump_db "$db_name" > db.sql # END OF SCRIPT #================================================= -ynh_print_info "Backup script completed. Please wait for YunoHost to create the backup." +ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index e19b82f..d279118 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -25,7 +25,7 @@ app=$YNH_APP_INSTANCE_NAME #================================================= # LOAD SETTINGS #================================================= -ynh_print_info "Load settings" +ynh_print_info "Loading installation settings..." # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get $app final_path) @@ -61,7 +61,7 @@ fi #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_print_info "Modify url in nginx configuration" +ynh_print_info "Updating nginx web server configuration..." nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf @@ -116,7 +116,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_print_info "Reload nginx" +ynh_print_info "Reloading nginx web server..." systemctl reload nginx @@ -124,4 +124,4 @@ systemctl reload nginx # END OF SCRIPT #================================================= -ynh_print_info "Change of url completed" +ynh_print_info "Change of URL completed for $app" diff --git a/scripts/install b/scripts/install index b24fff1..4510754 100644 --- a/scripts/install +++ b/scripts/install @@ -33,7 +33,7 @@ app=$YNH_APP_INSTANCE_NAME #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS #================================================= -ynh_print_info "Validating arguments ..." +ynh_print_info "Validating installation parameters..." final_path=/var/www/$app test ! -e "$final_path" || ynh_die "This path already contains a folder" @@ -47,7 +47,7 @@ ynh_webpath_register $app $domain $path_url #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_print_info "Store settings from manifest ..." +ynh_print_info "Storing installation settings..." ynh_app_setting_set $app domain $domain ynh_app_setting_set $app path $path_url @@ -79,7 +79,7 @@ ynh_setup_source "$final_path/app" #================================================= # NGINX CONFIGURATION #================================================= -ynh_print_info "Configuring nginx ..." +ynh_print_info "Configuring nginx web server..." # Create a dedicated nginx config ynh_add_nginx_config @@ -190,7 +190,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_print_info "Reloading nginx ..." +ynh_print_info "Reloading nginx web server..." systemctl reload nginx @@ -198,4 +198,4 @@ systemctl reload nginx # END OF SCRIPT #================================================= -ynh_print_info "Installation completed" +ynh_print_info "Installation of $app completed" diff --git a/scripts/remove b/scripts/remove index ab79cf0..7094419 100644 --- a/scripts/remove +++ b/scripts/remove @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_print_info "Load settings" +ynh_print_info "Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -25,7 +25,7 @@ final_path=$(ynh_app_setting_get $app final_path) #================================================= # REMOVE THE MYSQL DATABASE #================================================= -ynh_print_info "Remove the mysql database" +ynh_print_info "Removing the MySQL database" # Remove a database if it exists, along with the associated user ynh_mysql_remove_db $db_name $db_name @@ -33,7 +33,7 @@ ynh_mysql_remove_db $db_name $db_name #================================================= # REMOVE APP MAIN DIR #================================================= -ynh_print_info "Remove app main directory" +ynh_print_info "Removing app main directory" # Remove the app directory securely ynh_secure_remove "$final_path" @@ -41,7 +41,7 @@ ynh_secure_remove "$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_print_info "Remove nginx configuration" +ynh_print_info "Removing nginx web server configuration" # Remove the dedicated nginx config ynh_remove_nginx_config @@ -49,7 +49,7 @@ ynh_remove_nginx_config #================================================= # REMOVE PHP-FPM CONFIGURATION #================================================= -ynh_print_info "Remove php-fpm configuration" +ynh_print_info "Removing php-fpm configuration" # Remove the dedicated php-fpm config ynh_remove_fpm_config @@ -67,7 +67,7 @@ gpg --batch --delete-key --yes Rainloop #================================================= # REMOVE DEDICATED USER #================================================= -ynh_print_info "Remove the dedicated user" +ynh_print_info "Removing the dedicated system user" # Delete a system user ynh_system_user_delete $app @@ -76,4 +76,4 @@ ynh_system_user_delete $app # END OF SCRIPT #================================================= -ynh_print_info "Deletion completed" +ynh_print_info "Removal of $app completed" diff --git a/scripts/restore b/scripts/restore index 58fde33..a5e21df 100644 --- a/scripts/restore +++ b/scripts/restore @@ -19,7 +19,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_print_info "Load settings" +ynh_print_info "Loading settings..." app=$YNH_APP_INSTANCE_NAME @@ -31,6 +31,7 @@ db_name=$(ynh_app_setting_get $app db_name) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= +ynh_print_info "Validating restoration parameters..." ynh_webpath_available $domain $path_url \ || ynh_die "Path not available: ${domain}${path_url}" @@ -48,14 +49,14 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_print_info "Restore the app main directory" +ynh_print_info "Restoring the app main directory..." ynh_restore_file "$final_path" #================================================= # RECREATE THE DEDICATED USER #================================================= -ynh_print_info "Recreate the dedicated user" +ynh_print_info "Recreating the dedicated system user..." # Create the dedicated user (if not existing) ynh_system_user_create $app @@ -76,7 +77,7 @@ ynh_restore_file "/etc/php/7.0/fpm/pool.d/$app.conf" #================================================= # RESTORE THE MYSQL DATABASE #================================================= -ynh_print_info "Restore the mysql database" +ynh_print_info "Restoring the MySQL database..." db_pwd=$(ynh_app_setting_get $app mysqlpwd) ynh_mysql_setup_db $db_name $db_name $db_pwd @@ -87,7 +88,7 @@ ynh_mysql_connect_as $db_name $db_pwd $db_name < ./db.sql #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_print_info "Reload nginx and php-fpm" +ynh_print_info "Reloading nginx web server and php-fpm..." systemctl reload php7.0-fpm systemctl reload nginx @@ -96,4 +97,4 @@ systemctl reload nginx # END OF SCRIPT #================================================= -ynh_print_info "Restoration completed" +ynh_print_info "Restoration completed for $app" diff --git a/scripts/upgrade b/scripts/upgrade index a0284c4..186e2cb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= # LOAD SETTINGS #================================================= -ynh_print_info "Load settings" +ynh_print_info "Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -26,7 +26,7 @@ db_name=$(ynh_app_setting_get $app db_name) #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_print_info "Ensure downward compatibility" +ynh_print_info "Ensuring downward compatibility..." # Fix is_public as a boolean value if [ "$is_public" = "Yes" ]; then @@ -52,7 +52,7 @@ fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_print_info "Backup the app before upgrading" +ynh_print_info "Backing up the app before upgrading (may take a while)..." # Backup the current version of the app ynh_backup_before_upgrade @@ -75,7 +75,7 @@ path_url=$(ynh_normalize_url_path $path_url) #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_print_info "Download, check and unpack source" +ynh_print_info "Upgrading source files..." # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source "$final_path/app" @@ -83,7 +83,7 @@ ynh_setup_source "$final_path/app" #================================================= # NGINX CONFIGURATION #================================================= -ynh_print_info "Reconfigure nginx" +ynh_print_info "Upgrading nginx web server configuration..." # Create a dedicated nginx config ynh_add_nginx_config @@ -91,7 +91,7 @@ ynh_add_nginx_config #================================================= # CREATE DEDICATED USER #================================================= -ynh_print_info "Create a dedicated user" +ynh_print_info "Making sure dedicated system user exists..." # Create a dedicated user (if not existing) ynh_system_user_create $app @@ -99,7 +99,7 @@ ynh_system_user_create $app #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_print_info "Reconfigure php-fpm" +ynh_print_info "Upgrading php-fpm configuration..." # Create a dedicated php-fpm config ynh_add_fpm_config @@ -138,7 +138,7 @@ find $final_path/. -type f -exec chmod 644 {} \; #================================================= # SETUP SSOWAT #================================================= -ynh_print_info "Reconfigure SSOwat" +ynh_print_info "Upgrading SSOwat configuration..." # Make app public if necessary if [ $is_public -eq 1 ] @@ -150,7 +150,7 @@ fi #================================================= # RELOAD NGINX #================================================= -ynh_print_info "Reload nginx" +ynh_print_info "Reloading nginx web server..." systemctl reload nginx @@ -158,4 +158,4 @@ systemctl reload nginx # END OF SCRIPT #================================================= -ynh_print_info "Upgrade completed" +ynh_print_info "Upgrade of $app completed" From 6c0e86aa946e9013392627a58223bc47da26797d Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 1 Mar 2019 15:02:33 +0100 Subject: [PATCH 31/31] remove not needed licence information on README.md --- README.md | 4 ---- README_fr.md | 4 ---- 2 files changed, 8 deletions(-) diff --git a/README.md b/README.md index 40980f3..23d2202 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,6 @@ Rainloop is a lightweight webmail. **Shipped version:** 1.12.1 -## License - -**LICENSE:** AGPL-3.0-or-later - ## Screenshots ![](http://www.rainloop.net/static/media/screenshots/v2/12.png) diff --git a/README_fr.md b/README_fr.md index e99f220..375fd24 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,10 +13,6 @@ Rainloop est un webmail simple et léger. **Version incluse:** 1.12.1 -## License - -**LICENSE:** AGPL-3.0-or-later - ## Captures d'écran ![](http://www.rainloop.net/static/media/screenshots/v2/12.png)