From 58d59373ea185bd2a7d48340b8941edb5e616823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 5 Aug 2022 18:47:41 +0200 Subject: [PATCH 01/48] 4.11.0 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index 903f3cb..0e9987b 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://builds.matomo.org/matomo-4.10.1.tar.gz -SOURCE_SUM=4cddb1cb760786db9ec268bb87dbed30a125448f2e58ebe76331b54652064f75 +SOURCE_URL=https://builds.matomo.org/matomo-4.11.0.tar.gz +SOURCE_SUM=aa3a52cc5fe27128b4df30a3587014ebd08d2b988d54c6df1715fd7e5a81fb76 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 0770856..bbaa8a6 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source analytics platform for measuring Web statistics", "fr": "Plateforme d'analyse open source de mesure de statistiques Web" }, - "version": "4.10.1~ynh2", + "version": "4.11.0~ynh2", "url": "https://matomo.org", "upstream": { "license": "GPL-3.0-or-later", From d2e09cc76bdbba71807e8988bc027ea771387b08 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 5 Aug 2022 16:47:46 +0000 Subject: [PATCH 02/48] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a1e016f..630666f 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Shipped version:** 4.10.1~ynh2 +**Shipped version:** 4.11.0~ynh2 **Demo:** https://demo.matomo.org diff --git a/README_fr.md b/README_fr.md index 560dc28..c5a3c52 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Version incluse :** 4.10.1~ynh2 +**Version incluse :** 4.11.0~ynh2 **Démo :** https://demo.matomo.org From 6929c7cda515cc0befb76c44ed2e307bdb8bb963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 13 Aug 2022 07:38:56 +0200 Subject: [PATCH 03/48] Upgrade to php8 (#82) --- manifest.json | 4 ++-- scripts/_common.sh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index bbaa8a6..4fd34e1 100644 --- a/manifest.json +++ b/manifest.json @@ -21,12 +21,12 @@ "email": "anmol@datamol.org" }, "requirements": { - "yunohost": ">= 4.3.0" + "yunohost": ">= 11.0.9" }, "multi_instance": true, "services": [ "nginx", - "php7.3-fpm", + "php8.0-fpm", "mysql" ], "arguments": { diff --git a/scripts/_common.sh b/scripts/_common.sh index 3dfaa50..a60a9f5 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,8 +4,10 @@ # COMMON VARIABLES #================================================= +YNH_PHP_VERSION=8.0 + # dependencies used by the app -pkg_dependencies="php$YNH_DEFAULT_PHP_VERSION-curl php$YNH_DEFAULT_PHP_VERSION-gd php$YNH_DEFAULT_PHP_VERSION-cli php$YNH_DEFAULT_PHP_VERSION-mysql php$YNH_DEFAULT_PHP_VERSION-xml php$YNH_DEFAULT_PHP_VERSION-mbstring" +pkg_dependencies="php$YNH_PHP_VERSION-curl php$YNH_PHP_VERSION-gd php$YNH_PHP_VERSION-cli php$YNH_PHP_VERSION-mysql php$YNH_PHP_VERSION-xml php$YNH_PHP_VERSION-mbstring" #================================================= # PERSONAL HELPERS From d690e8e72640d99fca6396703c5dce67e7afba01 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 13 Aug 2022 05:38:59 +0000 Subject: [PATCH 04/48] Auto-update README --- README.md | 1 + README_fr.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 630666f..aded1ef 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Matomo aims to be a Free software alternative to Google Analytics and is already **Shipped version:** 4.11.0~ynh2 + **Demo:** https://demo.matomo.org ## Screenshots diff --git a/README_fr.md b/README_fr.md index c5a3c52..dd19f4f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,8 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Version incluse :** 4.11.0~ynh2 +**Version incluse :** 4.11.0~ynh2 + **Démo :** https://demo.matomo.org From 6410c1376c1464cb37f866be6f194787dcf4f253 Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Sat, 13 Aug 2022 07:39:48 +0200 Subject: [PATCH 05/48] =?UTF-8?q?[autopatch]=20Add=20Common=20Platform?= =?UTF-8?q?=C2=A0Enumeration=20id=20to=20`manifest.json`=20(#81)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Testing (#80) * 4.11.0 * Auto-update README Co-authored-by: yunohost-bot * [autopatch] Add Common Platform Enumeration id to `manifest.json` Co-authored-by: yalh76 Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: Yunohost-Bot <> --- README.md | 1 - README_fr.md | 3 +-- manifest.json | 5 +++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index aded1ef..630666f 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,6 @@ Matomo aims to be a Free software alternative to Google Analytics and is already **Shipped version:** 4.11.0~ynh2 - **Demo:** https://demo.matomo.org ## Screenshots diff --git a/README_fr.md b/README_fr.md index dd19f4f..c5a3c52 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,8 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Version incluse :** 4.11.0~ynh2 - +**Version incluse :** 4.11.0~ynh2 **Démo :** https://demo.matomo.org diff --git a/manifest.json b/manifest.json index 4fd34e1..ac93cca 100644 --- a/manifest.json +++ b/manifest.json @@ -13,7 +13,8 @@ "website": "https://matomo.org", "demo": "https://demo.matomo.org", "admindoc": "https://matomo.org/docs", - "code": "https://github.com/matomo-org/matomo" + "code": "https://github.com/matomo-org/matomo", + "cpe": "cpe:2.3:a:matomo:matomo" }, "license": "GPL-3.0-or-later", "maintainer": { @@ -56,4 +57,4 @@ } ] } -} +} \ No newline at end of file From a4c606bac3537f235e65e8aad8acdc4103d37865 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 13 Aug 2022 05:39:51 +0000 Subject: [PATCH 06/48] Auto-update README --- README.md | 1 + README_fr.md | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 630666f..aded1ef 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Matomo aims to be a Free software alternative to Google Analytics and is already **Shipped version:** 4.11.0~ynh2 + **Demo:** https://demo.matomo.org ## Screenshots diff --git a/README_fr.md b/README_fr.md index c5a3c52..dd19f4f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,8 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Version incluse :** 4.11.0~ynh2 +**Version incluse :** 4.11.0~ynh2 + **Démo :** https://demo.matomo.org From fb4a8a4b7656ee96de1cd2e8d72cc778ef2baa21 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 13 Aug 2022 05:40:34 +0000 Subject: [PATCH 07/48] Auto-update README --- README.md | 1 + README_fr.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 630666f..aded1ef 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Matomo aims to be a Free software alternative to Google Analytics and is already **Shipped version:** 4.11.0~ynh2 + **Demo:** https://demo.matomo.org ## Screenshots diff --git a/README_fr.md b/README_fr.md index 6fba163..dd19f4f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -24,6 +24,7 @@ Matomo aims to be a Free software alternative to Google Analytics and is already **Version incluse :** 4.11.0~ynh2 + **Démo :** https://demo.matomo.org ## Captures d'écran From cd5a006f1186c9016a2d025aca0d93620908d1a3 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 13 Aug 2022 07:42:36 +0200 Subject: [PATCH 08/48] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index ac93cca..b111482 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source analytics platform for measuring Web statistics", "fr": "Plateforme d'analyse open source de mesure de statistiques Web" }, - "version": "4.11.0~ynh2", + "version": "4.11.0~ynh3", "url": "https://matomo.org", "upstream": { "license": "GPL-3.0-or-later", From 5372cc24376fcb2fc0b0d7727d32be02004ccf85 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 13 Aug 2022 05:42:40 +0000 Subject: [PATCH 09/48] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aded1ef..d230c69 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Shipped version:** 4.11.0~ynh2 +**Shipped version:** 4.11.0~ynh3 **Demo:** https://demo.matomo.org diff --git a/README_fr.md b/README_fr.md index dd19f4f..4fa6d7c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Version incluse :** 4.11.0~ynh2 +**Version incluse :** 4.11.0~ynh3 **Démo :** https://demo.matomo.org From 605ee8be51ca558d88d12841a4f3da9e1d4c5578 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 15 Aug 2022 17:11:17 +0200 Subject: [PATCH 10/48] fix upgrade : Missing phpversion var definition, later used around line 117 --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 89fa25c..3c789e5 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,6 +23,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) email=$(ynh_user_get_info --username=$admin --key=mail) From dcee710b669a28192fa13cfd8d75e7036ebba9bf Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Aug 2022 17:42:09 +0200 Subject: [PATCH 11/48] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 89fa25c..4e48156 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -111,7 +111,7 @@ then ynh_setup_source --dest_dir="$final_path" else # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config/config.ini.php" + ynh_setup_source --dest_dir="$final_path" --keep="config/config.ini.php" chown -R $app:www-data "$final_path" ynh_exec_as $app php${phpversion} $final_path/console core:update -n From 9fca02fa9dc49b80180d863cbef336c2f6c5df7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 18 Aug 2022 21:46:44 +0200 Subject: [PATCH 12/48] Add php config (#85) --- conf/nginx.conf | 2 +- conf/php-fpm.conf | 430 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 431 insertions(+), 1 deletion(-) create mode 100644 conf/php-fpm.conf diff --git a/conf/nginx.conf b/conf/nginx.conf index 9221731..8686306 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -11,7 +11,7 @@ location ^~ __PATH__/ { index index.php; # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file - #client_max_body_size 50M; + client_max_body_size 50M; try_files $uri $uri/ =404; location ~ [^/]\.php(/|$) { diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf new file mode 100644 index 0000000..b4c2372 --- /dev/null +++ b/conf/php-fpm.conf @@ -0,0 +1,430 @@ +; 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) +[__NAMETOCHANGE__] + +; Per pool prefix +; It only applies on the following directives: +; - 'access.log' +; - 'slowlog' +; - 'listen' (unixsocket) +; - 'chroot' +; - 'chdir' +; - 'php_values' +; - 'php_admin_values' +; When not set, the global prefix (or /usr) applies instead. +; Note: This directive can also be relative to the global prefix. +; 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 IPv4 address 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/php/php__PHPVERSION__-fpm-__NAMETOCHANGE__.sock + +; Set listen(2) backlog. +; Default Value: 511 (-1 on FreeBSD and OpenBSD) +;listen.backlog = 511 + +; 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 +; accepted from any ip address. +; Default Value: any +;listen.allowed_clients = 127.0.0.1 + +; 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 + +; 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. 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. +; pm.min_spare_servers - the minimum number of children in 'idle' +; state (waiting to process). If the number +; of 'idle' processes is less than this +; number then some children will be created. +; pm.max_spare_servers - the maximum number of children in 'idle' +; 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 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. 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 = 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 = 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 = 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 = 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 +; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. +; Default Value: 0 +;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. It shows the following informations: +; pool - the name of the pool; +; 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; +; 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' and 'ondemand'); +; Value are updated in real time. +; Example output: +; pool: www +; process manager: static +; 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', '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. +; Default Value: not set +;pm.status_path = /status + +; The ping URI to call the monitoring page of FPM. If this value is not set, no +; URI will be recognized as a ping page. This could be used to test from outside +; that FPM is alive and responding, or to +; - create a graph of FPM availability (rrd or such); +; - remove a server from a group if it is not responding (load balancing); +; - trigger alerts for the operating team (24/7). +; 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. +; Default Value: not set +;ping.path = /ping + +; This directive may be used to customize the response of a ping request. The +; response is formatted as text/plain with a 200 response code. +; Default Value: pong +;ping.response = pong + +; 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 + +; 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'. +; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) +; Default Value: 0 +;request_slowlog_timeout = 0 + +; 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 = 1d + +; Set open file descriptor rlimit. +; Default Value: system defined value +;rlimit_files = 1024 + +; Set max core size rlimit. +; Possible Values: 'unlimited' or an integer greater or equal to 0 +; Default Value: system defined value +;rlimit_core = 0 + +; Chroot to this directory at the start. This value must be defined as an +; absolute path. When this value is not set, chroot is not used. +; Note: you can prefix with '$prefix' to chroot to the pool prefix or one +; of its subdirectories. If the pool prefix is not set, the global prefix +; will be used instead. +; Note: chrooting is a great security feature and should be used whenever +; possible. However, all PHP paths will be relative to the chroot +; (error_log, sessions.save_path, ...). +; Default Value: not set +;chroot = + +; Chdir to this directory at the start. +; Note: relative path can be used. +; Default Value: current directory or / when chroot +chdir = __FINALPATH__ + +; Redirect worker stdout and stderr into main error log. If not set, stdout and +; stderr will be redirected to /dev/null according to FastCGI specs. +; Note: on highloaded environement, this can cause some delay in the page +; process time (several ms). +; 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 +;env[HOSTNAME] = $HOSTNAME +;env[PATH] = /usr/local/bin:/usr/bin:/bin +;env[TMP] = /tmp +;env[TMPDIR] = /tmp +;env[TEMP] = /tmp + +; Additional php.ini defines, specific to this pool of workers. These settings +; overwrite the values previously defined in the php.ini. The directives are the +; same as the PHP SAPI: +; php_value/php_flag - you can set classic ini defines which can +; be overwritten from PHP call 'ini_set'. +; php_admin_value/php_admin_flag - these directives won't be overwritten by +; PHP call 'ini_set' +; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. + +; Defining 'extension' will load the corresponding shared extension from +; extension_dir. Defining 'disable_functions' or 'disable_classes' will not +; overwrite previously defined php.ini values, but will append the new value +; instead. + +; Note: path INI options can be relative and will be expanded with the prefix +; (pool, global or /usr) + +; Default Value: nothing is defined by default except the values in php.ini and +; specified at startup with the -d argument +;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com +;php_flag[display_errors] = off +;php_admin_value[error_log] = /var/log/fpm-php.www.log +;php_admin_flag[log_errors] = on +;php_admin_value[memory_limit] = 32M + +; Common values to change to increase file upload limit +php_admin_value[upload_max_filesize] = 50M +php_admin_value[post_max_size] = 50M +; 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 fdebd783a4964fedf73346e730f82cd8cddb9adf Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 20 Aug 2022 07:36:07 +0200 Subject: [PATCH 13/48] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index b111482..f998297 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source analytics platform for measuring Web statistics", "fr": "Plateforme d'analyse open source de mesure de statistiques Web" }, - "version": "4.11.0~ynh3", + "version": "4.11.0~ynh4", "url": "https://matomo.org", "upstream": { "license": "GPL-3.0-or-later", From d485b1ef3763dd0f00e1229f6655461abf22a132 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 20 Aug 2022 05:36:11 +0000 Subject: [PATCH 14/48] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d230c69..667b397 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Shipped version:** 4.11.0~ynh3 +**Shipped version:** 4.11.0~ynh4 **Demo:** https://demo.matomo.org diff --git a/README_fr.md b/README_fr.md index 4fa6d7c..b48a3a9 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Version incluse :** 4.11.0~ynh3 +**Version incluse :** 4.11.0~ynh4 **Démo :** https://demo.matomo.org From a450babe0b00cd8f3333fbb1419ba040934e5e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 7 Oct 2022 19:06:34 +0200 Subject: [PATCH 15/48] 4.12.0 (#87) * 4.12.0 * Auto-update README Co-authored-by: yunohost-bot --- README.md | 3 +-- README_fr.md | 3 +-- conf/app.src | 4 ++-- manifest.json | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 667b397..f84cb7b 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Shipped version:** 4.11.0~ynh4 - +**Shipped version:** 4.12.0~ynh1 **Demo:** https://demo.matomo.org diff --git a/README_fr.md b/README_fr.md index b48a3a9..13ad2e0 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,8 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Version incluse :** 4.11.0~ynh4 - +**Version incluse :** 4.12.0~ynh1 **Démo :** https://demo.matomo.org diff --git a/conf/app.src b/conf/app.src index 0e9987b..1a8ba6d 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://builds.matomo.org/matomo-4.11.0.tar.gz -SOURCE_SUM=aa3a52cc5fe27128b4df30a3587014ebd08d2b988d54c6df1715fd7e5a81fb76 +SOURCE_URL=https://builds.matomo.org/matomo-4.12.0.tar.gz +SOURCE_SUM=5808947e234d278d1a5d33509014197e8882e5d15d7a31be77b31cee259c4928 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index f998297..9795adb 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source analytics platform for measuring Web statistics", "fr": "Plateforme d'analyse open source de mesure de statistiques Web" }, - "version": "4.11.0~ynh4", + "version": "4.12.0~ynh1", "url": "https://matomo.org", "upstream": { "license": "GPL-3.0-or-later", From 418816268e55aa04633ca159d65e0e4af858ee9c Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 17 Oct 2022 11:37:30 +0200 Subject: [PATCH 16/48] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 755f39b..c4ee32e 100755 --- a/scripts/install +++ b/scripts/install @@ -138,7 +138,7 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= ynh_script_progression --message="Sending a readme for the admin..." --weight=1 -message="Matomo was successfully installed :) +message="Matomo was successfully installed Please open your $app domain: https://$domain$path_url From 1865d321fc562fc7e41a35df021fb431492cd64d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 19 Oct 2022 08:24:19 +0200 Subject: [PATCH 17/48] 4.12.1 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index 1a8ba6d..8119af7 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://builds.matomo.org/matomo-4.12.0.tar.gz -SOURCE_SUM=5808947e234d278d1a5d33509014197e8882e5d15d7a31be77b31cee259c4928 +SOURCE_URL=https://builds.matomo.org/matomo-4.12.1.tar.gz +SOURCE_SUM=a8b5eaf4ede42b71a68b0bf869e974f1e123972e8177e8fe531cc9684d04540f SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 9795adb..9ecae1d 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source analytics platform for measuring Web statistics", "fr": "Plateforme d'analyse open source de mesure de statistiques Web" }, - "version": "4.12.0~ynh1", + "version": "4.12.1~ynh1", "url": "https://matomo.org", "upstream": { "license": "GPL-3.0-or-later", From f89b837e461ae29655481cc1d172bb5f4f612345 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 19 Oct 2022 06:24:24 +0000 Subject: [PATCH 18/48] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f84cb7b..bbc32b5 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Shipped version:** 4.12.0~ynh1 +**Shipped version:** 4.12.1~ynh1 **Demo:** https://demo.matomo.org diff --git a/README_fr.md b/README_fr.md index 13ad2e0..051907b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Version incluse :** 4.12.0~ynh1 +**Version incluse :** 4.12.1~ynh1 **Démo :** https://demo.matomo.org From bf3f97f546d19db4fabbbcbb60aee954d4d41d8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 21 Oct 2022 08:17:34 +0200 Subject: [PATCH 19/48] 4.12.2 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index 8119af7..39e9c83 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://builds.matomo.org/matomo-4.12.1.tar.gz -SOURCE_SUM=a8b5eaf4ede42b71a68b0bf869e974f1e123972e8177e8fe531cc9684d04540f +SOURCE_URL=https://builds.matomo.org/matomo-4.12.2.tar.gz +SOURCE_SUM=cad869e4f357e023fb0fa8f605191d1b99a3d19e7e859780ac73fe438d764e7b SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 9ecae1d..c942c3a 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source analytics platform for measuring Web statistics", "fr": "Plateforme d'analyse open source de mesure de statistiques Web" }, - "version": "4.12.1~ynh1", + "version": "4.12.2~ynh1", "url": "https://matomo.org", "upstream": { "license": "GPL-3.0-or-later", From d1062c98c6feb21295f2632e444594e7fcc42228 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 21 Oct 2022 06:17:40 +0000 Subject: [PATCH 20/48] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bbc32b5..1edafda 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Shipped version:** 4.12.1~ynh1 +**Shipped version:** 4.12.2~ynh1 **Demo:** https://demo.matomo.org diff --git a/README_fr.md b/README_fr.md index 051907b..aab83fd 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Version incluse :** 4.12.1~ynh1 +**Version incluse :** 4.12.2~ynh1 **Démo :** https://demo.matomo.org From 1de26614601da406165c3f500237c341f7257fc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 28 Oct 2022 09:28:42 +0200 Subject: [PATCH 21/48] 4.12.3 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index 39e9c83..ca5da0c 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://builds.matomo.org/matomo-4.12.2.tar.gz -SOURCE_SUM=cad869e4f357e023fb0fa8f605191d1b99a3d19e7e859780ac73fe438d764e7b +SOURCE_URL=https://builds.matomo.org/matomo-4.12.3.tar.gz +SOURCE_SUM=00efe4335c9cee9f269b5e8a337026af7f115c05cde1e9ae47485592372b37ee SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index c942c3a..5a6c933 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Open source analytics platform for measuring Web statistics", "fr": "Plateforme d'analyse open source de mesure de statistiques Web" }, - "version": "4.12.2~ynh1", + "version": "4.12.3~ynh1", "url": "https://matomo.org", "upstream": { "license": "GPL-3.0-or-later", From 5e69dc81fac433a0450c727dbdb4da9825cceb08 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 28 Oct 2022 07:28:47 +0000 Subject: [PATCH 22/48] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1edafda..d92b7fe 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Shipped version:** 4.12.2~ynh1 +**Shipped version:** 4.12.3~ynh1 **Demo:** https://demo.matomo.org diff --git a/README_fr.md b/README_fr.md index aab83fd..4d24d84 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Version incluse :** 4.12.2~ynh1 +**Version incluse :** 4.12.3~ynh1 **Démo :** https://demo.matomo.org From f4a219373a5bc8a0d0631b47cb01cf2fa92fd92d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 11 Jan 2023 09:46:06 +0100 Subject: [PATCH 23/48] PHP setup --- conf/extra_php-fpm.conf | 4 + conf/php-fpm.conf | 430 ---------------------------------------- config_panel.toml | 15 +- scripts/config | 14 +- scripts/install | 9 +- scripts/restore | 5 +- scripts/upgrade | 38 ++-- 7 files changed, 55 insertions(+), 460 deletions(-) create mode 100644 conf/extra_php-fpm.conf delete mode 100644 conf/php-fpm.conf diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf new file mode 100644 index 0000000..700c37c --- /dev/null +++ b/conf/extra_php-fpm.conf @@ -0,0 +1,4 @@ +; Additional php.ini defines, specific to this pool of workers. + +php_admin_value[upload_max_filesize] = 50M +php_admin_value[post_max_size] = 50M diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf deleted file mode 100644 index b4c2372..0000000 --- a/conf/php-fpm.conf +++ /dev/null @@ -1,430 +0,0 @@ -; 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) -[__NAMETOCHANGE__] - -; Per pool prefix -; It only applies on the following directives: -; - 'access.log' -; - 'slowlog' -; - 'listen' (unixsocket) -; - 'chroot' -; - 'chdir' -; - 'php_values' -; - 'php_admin_values' -; When not set, the global prefix (or /usr) applies instead. -; Note: This directive can also be relative to the global prefix. -; 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 IPv4 address 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/php/php__PHPVERSION__-fpm-__NAMETOCHANGE__.sock - -; Set listen(2) backlog. -; Default Value: 511 (-1 on FreeBSD and OpenBSD) -;listen.backlog = 511 - -; 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 -; accepted from any ip address. -; Default Value: any -;listen.allowed_clients = 127.0.0.1 - -; 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 - -; 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. 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. -; pm.min_spare_servers - the minimum number of children in 'idle' -; state (waiting to process). If the number -; of 'idle' processes is less than this -; number then some children will be created. -; pm.max_spare_servers - the maximum number of children in 'idle' -; 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 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. 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 = 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 = 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 = 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 = 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 -; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS. -; Default Value: 0 -;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. It shows the following informations: -; pool - the name of the pool; -; 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; -; 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' and 'ondemand'); -; Value are updated in real time. -; Example output: -; pool: www -; process manager: static -; 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', '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. -; Default Value: not set -;pm.status_path = /status - -; The ping URI to call the monitoring page of FPM. If this value is not set, no -; URI will be recognized as a ping page. This could be used to test from outside -; that FPM is alive and responding, or to -; - create a graph of FPM availability (rrd or such); -; - remove a server from a group if it is not responding (load balancing); -; - trigger alerts for the operating team (24/7). -; 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. -; Default Value: not set -;ping.path = /ping - -; This directive may be used to customize the response of a ping request. The -; response is formatted as text/plain with a 200 response code. -; Default Value: pong -;ping.response = pong - -; 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 - -; 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'. -; Available units: s(econds)(default), m(inutes), h(ours), or d(ays) -; Default Value: 0 -;request_slowlog_timeout = 0 - -; 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 = 1d - -; Set open file descriptor rlimit. -; Default Value: system defined value -;rlimit_files = 1024 - -; Set max core size rlimit. -; Possible Values: 'unlimited' or an integer greater or equal to 0 -; Default Value: system defined value -;rlimit_core = 0 - -; Chroot to this directory at the start. This value must be defined as an -; absolute path. When this value is not set, chroot is not used. -; Note: you can prefix with '$prefix' to chroot to the pool prefix or one -; of its subdirectories. If the pool prefix is not set, the global prefix -; will be used instead. -; Note: chrooting is a great security feature and should be used whenever -; possible. However, all PHP paths will be relative to the chroot -; (error_log, sessions.save_path, ...). -; Default Value: not set -;chroot = - -; Chdir to this directory at the start. -; Note: relative path can be used. -; Default Value: current directory or / when chroot -chdir = __FINALPATH__ - -; Redirect worker stdout and stderr into main error log. If not set, stdout and -; stderr will be redirected to /dev/null according to FastCGI specs. -; Note: on highloaded environement, this can cause some delay in the page -; process time (several ms). -; 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 -;env[HOSTNAME] = $HOSTNAME -;env[PATH] = /usr/local/bin:/usr/bin:/bin -;env[TMP] = /tmp -;env[TMPDIR] = /tmp -;env[TEMP] = /tmp - -; Additional php.ini defines, specific to this pool of workers. These settings -; overwrite the values previously defined in the php.ini. The directives are the -; same as the PHP SAPI: -; php_value/php_flag - you can set classic ini defines which can -; be overwritten from PHP call 'ini_set'. -; php_admin_value/php_admin_flag - these directives won't be overwritten by -; PHP call 'ini_set' -; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no. - -; Defining 'extension' will load the corresponding shared extension from -; extension_dir. Defining 'disable_functions' or 'disable_classes' will not -; overwrite previously defined php.ini values, but will append the new value -; instead. - -; Note: path INI options can be relative and will be expanded with the prefix -; (pool, global or /usr) - -; Default Value: nothing is defined by default except the values in php.ini and -; specified at startup with the -d argument -;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com -;php_flag[display_errors] = off -;php_admin_value[error_log] = /var/log/fpm-php.www.log -;php_admin_flag[log_errors] = on -;php_admin_value[memory_limit] = 32M - -; Common values to change to increase file upload limit -php_admin_value[upload_max_filesize] = 50M -php_admin_value[post_max_size] = 50M -; 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 diff --git a/config_panel.toml b/config_panel.toml index cde6230..e8cbab8 100644 --- a/config_panel.toml +++ b/config_panel.toml @@ -7,19 +7,24 @@ name = "Matomo configuration" name = "PHP-FPM configuration" [main.php_fpm_config.fpm_footprint] - ask = "Memory footprint of the service?" - choices = ["low", "medium", "high", "specific"] + ask = "Memory footprint" + type = "select" + choices.low = "Low, <= 20Mb per pool" + choices.medium = "Medium, between 20Mb and 40Mb per pool" + choices.high = "High, > 40Mb per pool" + choices.specific = "Use specific value" default = "low" - help = "low <= 20Mb per pool. medium between 20Mb and 40Mb per pool. high > 40Mb per pool.
Use specific to set a value with the following option." - [main.php_fpm_config.free_footprint] + [main.php_fpm_config.fpm_free_footprint] + visible = "fpm_footprint == 'specific'" ask = "Memory footprint of the service?" type = "number" default = "0" help = "Free field to specify exactly the footprint in Mb if you don't want to use one of the three previous values." [main.php_fpm_config.fpm_usage] - ask = "Expected usage of the service?" + ask = "Expected usage" + type = "select" choices = ["low", "medium", "high"] default = "low" help = "low: Personal usage, behind the SSO. No RAM footprint when not used, but the impact on the processor can be high if many users are using the service.
medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.
high: High usage, frequently visited website. High RAM footprint, but lower on processor usage and quickly responding." diff --git a/scripts/config b/scripts/config index 8a9110c..91c2de7 100644 --- a/scripts/config +++ b/scripts/config @@ -56,10 +56,10 @@ set__fpm_footprint() { fi } -set__free_footprint() { - if [ "$fpm_footprint" == "specific" ] +set__fpm_free_footprint() { + if [ "$fpm_footprint" = "specific" ] then - ynh_app_setting_set --app=$app --key=fpm_footprint --value="$free_footprint" + ynh_app_setting_set --app=$app --key=fpm_footprint --value="$fpm_free_footprint" fi } @@ -70,11 +70,11 @@ set__free_footprint() { ynh_app_config_validate() { _ynh_app_config_validate - if [ "${changed[fpm_usage]}" == "true" ] || [ "${changed[fpm_footprint]}" == "true" ] || [ "${changed[free_footprint]}" == "true" ]; then - # If fpm_footprint is set to 'specific', use $free_footprint value. - if [ "$fpm_footprint" == "specific" ] + if [ "${changed[fpm_usage]}" == "true" ] || [ "${changed[fpm_footprint]}" == "true" ] || [ "${changed[fpm_free_footprint]}" == "true" ]; then + # If fpm_footprint is set to 'specific', use $fpm_free_footprint value. + if [ "$fpm_footprint" = "specific" ] then - fpm_footprint=$free_footprint + fpm_footprint=$fpm_free_footprint fi if [ "$fpm_footprint" == "0" ] diff --git a/scripts/install b/scripts/install index c4ee32e..028aaf7 100755 --- a/scripts/install +++ b/scripts/install @@ -28,6 +28,9 @@ admin=$YNH_APP_ARG_ADMIN app=$YNH_APP_INSTANCE_NAME email=$(ynh_user_get_info --username=$admin --key=mail) +fpm_footprint="low" +fpm_free_footprint=0 +fpm_usage="low" #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS @@ -47,6 +50,9 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url +ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint +ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint +ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage #================================================= # INSTALL DEPENDENCIES @@ -92,7 +98,8 @@ chown -R $app:www-data "$final_path" ynh_script_progression --message="Configuring PHP-FPM..." --weight=3 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=low --footprint=low +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # NGINX CONFIGURATION diff --git a/scripts/restore b/scripts/restore index 0856a95..c078c92 100755 --- a/scripts/restore +++ b/scripts/restore @@ -30,6 +30,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) + fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) @@ -78,8 +79,8 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig # Restore the file first, so it can have a backup if different ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -# Recreate a dedicated PHP-FPM config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint +# Recreate a dedicated php-fpm config +ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion #================================================= # RESTORE THE NGINX CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 13b6e53..d62db49 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -21,11 +21,12 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) -fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) -fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) email=$(ynh_user_get_info --username=$admin --key=mail) +fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) +fpm_free_footprint=$(ynh_app_setting_get --app=$app --key=fpm_free_footprint) +fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) #================================================= # CHECK VERSION @@ -53,6 +54,24 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +# If fpm_footprint doesn't exist, create it +if [ -z "$fpm_footprint" ]; then + fpm_footprint=low + ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint +fi + +# If fpm_free_footprint doesn't exist, create it +if [ -z "$fpm_free_footprint" ]; then + fpm_free_footprint=0 + ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint +fi + +# If fpm_usage doesn't exist, create it +if [ -z "$fpm_usage" ]; then + fpm_usage=low + ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage +fi + # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all @@ -77,18 +96,6 @@ if [ -z "$admin" ]; then email=root@$domain fi -# If fpm_footprint doesn't exist, create it -if [ -z "$fpm_footprint" ]; then - fpm_footprint=low - ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint -fi - -# If fpm_usage doesn't exist, create it -if [ -z "$fpm_usage" ]; then - fpm_usage=low - ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage -fi - #================================================= # CREATE DEDICATED USER #================================================= @@ -136,7 +143,8 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint +ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # NGINX CONFIGURATION From 1f08a104ed9a4b199a9267269f76884fe64490e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 16 Jan 2023 15:22:51 +0100 Subject: [PATCH 24/48] 4.13.1 --- conf/app.src | 4 ++-- manifest.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/app.src b/conf/app.src index ca5da0c..ff0762c 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://builds.matomo.org/matomo-4.12.3.tar.gz -SOURCE_SUM=00efe4335c9cee9f269b5e8a337026af7f115c05cde1e9ae47485592372b37ee +SOURCE_URL=https://builds.matomo.org/matomo-4.13.1.tar.gz +SOURCE_SUM=d0439ee9895a86d51698d6ea593b6e45e2f4ea4925ef198f7c7027ab87fc4cf9 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 5a6c933..cdb92b6 100644 --- a/manifest.json +++ b/manifest.json @@ -3,10 +3,10 @@ "id": "matomo", "packaging_format": 1, "description": { - "en": "Open source analytics platform for measuring Web statistics", - "fr": "Plateforme d'analyse open source de mesure de statistiques Web" + "en": "Analytics platform for measuring Web statistics", + "fr": "Plateforme d'analyse de mesure de statistiques Web" }, - "version": "4.12.3~ynh1", + "version": "4.13.1~ynh1", "url": "https://matomo.org", "upstream": { "license": "GPL-3.0-or-later", From 817179fadd8727b6f10e5a71e8fbde92a8c2c43e Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 16 Jan 2023 14:22:56 +0000 Subject: [PATCH 25/48] Auto-update README --- README.md | 2 +- README_fr.md | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index d92b7fe..60236cf 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Shipped version:** 4.12.3~ynh1 +**Shipped version:** 4.13.1~ynh1 **Demo:** https://demo.matomo.org diff --git a/README_fr.md b/README_fr.md index 4d24d84..07e5fb6 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,15 +5,15 @@ It shall NOT be edited by hand. # Matomo pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/matomo.svg)](https://dash.yunohost.org/appci/app/matomo) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/matomo.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/matomo.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/matomo.svg)](https://dash.yunohost.org/appci/app/matomo) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/matomo.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/matomo.maintain.svg) [![Installer Matomo avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=matomo) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Matomo 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.* +> *Ce package vous permet d’installer Matomo 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 +## Vue d’ensemble Matomo is the leading Free/Libre open analytics platform. @@ -22,13 +22,13 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Version incluse :** 4.12.3~ynh1 +**Version incluse :** 4.13.1~ynh1 **Démo :** https://demo.matomo.org -## Captures d'écran +## Captures d’écran -![Capture d'écran de Matomo](./doc/screenshots/screenshot.png) +![Capture d’écran de Matomo](./doc/screenshots/screenshot.png) ## Avertissements / informations importantes @@ -40,9 +40,9 @@ Matomo aims to be a Free software alternative to Google Analytics and is already ## Documentations et ressources -* Site officiel de l'app : -* Documentation officielle de l'admin : -* Dépôt de code officiel de l'app : +* Site officiel de l’app : +* Documentation officielle de l’admin : +* Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : @@ -58,4 +58,4 @@ ou sudo yunohost app upgrade matomo -u https://github.com/YunoHost-Apps/matomo_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file From da0d3b3dcc5192dd385d84d6b18f8d3197da31ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 25 Jan 2023 22:12:33 +0100 Subject: [PATCH 26/48] 4.13.2 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index ff0762c..5d1be40 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://builds.matomo.org/matomo-4.13.1.tar.gz -SOURCE_SUM=d0439ee9895a86d51698d6ea593b6e45e2f4ea4925ef198f7c7027ab87fc4cf9 +SOURCE_URL=https://builds.matomo.org/matomo-4.13.2.tar.gz +SOURCE_SUM=f6bead008e2ac370df0e8df4ba643e7b05d733714f2f4d3f7b7928d0ef4ff44a SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index cdb92b6..e64f165 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Analytics platform for measuring Web statistics", "fr": "Plateforme d'analyse de mesure de statistiques Web" }, - "version": "4.13.1~ynh1", + "version": "4.13.2~ynh1", "url": "https://matomo.org", "upstream": { "license": "GPL-3.0-or-later", From b6f5519c9b6969aa2e031b03aafe3d87975ff3d0 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 25 Jan 2023 21:12:37 +0000 Subject: [PATCH 27/48] Auto-update README --- README.md | 4 ++-- README_fr.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 60236cf..31cfc91 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Matomo for YunoHost -[![Integration level](https://dash.yunohost.org/integration/matomo.svg)](https://dash.yunohost.org/appci/app/matomo) ![Working status](https://ci-apps.yunohost.org/ci/badges/matomo.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/matomo.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/matomo.svg)](https://dash.yunohost.org/appci/app/matomo) ![Working status](https://ci-apps.yunohost.org/ci/badges/matomo.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/matomo.maintain.svg) [![Install Matomo with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=matomo) *[Lire ce readme en français.](./README_fr.md)* @@ -22,7 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Shipped version:** 4.13.1~ynh1 +**Shipped version:** 4.13.2~ynh1 **Demo:** https://demo.matomo.org diff --git a/README_fr.md b/README_fr.md index 07e5fb6..22087b8 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Matomo pour YunoHost -[![Niveau d’intégration](https://dash.yunohost.org/integration/matomo.svg)](https://dash.yunohost.org/appci/app/matomo) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/matomo.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/matomo.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/matomo.svg)](https://dash.yunohost.org/appci/app/matomo) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/matomo.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/matomo.maintain.svg) [![Installer Matomo avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=matomo) *[Read this readme in english.](./README.md)* @@ -22,7 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Version incluse :** 4.13.1~ynh1 +**Version incluse :** 4.13.2~ynh1 **Démo :** https://demo.matomo.org From 4b841f4046906ffab0b6223337009a5c2cf7413f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 30 Jan 2023 18:06:07 +0100 Subject: [PATCH 28/48] 4.13.3 --- conf/app.src | 4 ++-- manifest.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/app.src b/conf/app.src index 5d1be40..9140e90 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://builds.matomo.org/matomo-4.13.2.tar.gz -SOURCE_SUM=f6bead008e2ac370df0e8df4ba643e7b05d733714f2f4d3f7b7928d0ef4ff44a +SOURCE_URL=https://builds.matomo.org/matomo-4.13.3.tar.gz +SOURCE_SUM=d7bcb4c45cba69afd9c849bd554bc88b8fc6971769c1f5aff997623bac05e0ac SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index e64f165..236407e 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Analytics platform for measuring Web statistics", "fr": "Plateforme d'analyse de mesure de statistiques Web" }, - "version": "4.13.2~ynh1", + "version": "4.13.3~ynh1", "url": "https://matomo.org", "upstream": { "license": "GPL-3.0-or-later", From 2cfe76ad162b87b3fafc565a96d239eb94481765 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 30 Jan 2023 17:06:12 +0000 Subject: [PATCH 29/48] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 31cfc91..38cc72f 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Shipped version:** 4.13.2~ynh1 +**Shipped version:** 4.13.3~ynh1 **Demo:** https://demo.matomo.org diff --git a/README_fr.md b/README_fr.md index 22087b8..b0a9091 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,7 @@ Matomo is a full-featured PHP MySQL software program that you download and insta Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Version incluse :** 4.13.2~ynh1 +**Version incluse :** 4.13.3~ynh1 **Démo :** https://demo.matomo.org From 3a63439dc1a82b184997ee4d2e4dc5699e561d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 13 Mar 2023 22:12:37 +0100 Subject: [PATCH 30/48] V2 (#99) * v2 * v2 * Fix * Auto-update README * Update manifest.toml * fix * Auto-update README * Update tests.toml * Auto-update README * Update manifest.toml * Update POST_INSTALL_fr.md * Fix * Auto-update README * fix * Update tests.toml * Update manifest.toml * Auto-update README * Update doc/POST_INSTALL.md Co-authored-by: Alexandre Aubin * Update upgrade * fix --------- Co-authored-by: yunohost-bot Co-authored-by: Alexandre Aubin --- README.md | 13 +---- README_fr.md | 13 +---- check_process | 25 ---------- conf/app.src | 7 --- conf/cron | 2 +- conf/nginx.conf | 2 +- doc/DESCRIPTION.md | 4 +- doc/DISCLAIMER.md | 5 -- doc/DISCLAIMER_fr.md | 5 -- doc/POST_INSTALL.md | 7 +++ manifest.json | 60 ---------------------- manifest.toml | 65 ++++++++++++++++++++++++ scripts/_common.sh | 62 ----------------------- scripts/backup | 21 +------- scripts/change_url | 88 +------------------------------- scripts/install | 109 ++-------------------------------------- scripts/remove | 48 ------------------ scripts/restore | 62 ++--------------------- scripts/upgrade | 116 ++++--------------------------------------- tests.toml | 9 ++++ 20 files changed, 106 insertions(+), 617 deletions(-) delete mode 100644 check_process delete mode 100644 conf/app.src delete mode 100644 doc/DISCLAIMER.md delete mode 100644 doc/DISCLAIMER_fr.md create mode 100644 doc/POST_INSTALL.md delete mode 100644 manifest.json create mode 100644 manifest.toml create mode 100644 tests.toml diff --git a/README.md b/README.md index 38cc72f..a5980e7 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # Matomo for YunoHost [![Integration level](https://dash.yunohost.org/integration/matomo.svg)](https://dash.yunohost.org/appci/app/matomo) ![Working status](https://ci-apps.yunohost.org/ci/badges/matomo.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/matomo.maintain.svg) + [![Install Matomo with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=matomo) *[Lire ce readme en français.](./README_fr.md)* @@ -15,9 +16,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -Matomo is the leading Free/Libre open analytics platform. - -Matomo is a full-featured PHP MySQL software program that you download and install on your own webserver. At the end of the five-minute installation process, you will be given a JavaScript code. Simply copy and paste this tag on websites you wish to track and access your analytics reports in real-time. +Matomo is the leading Free/Libre open analytics platform. At the end of the five-minute installation process, you will be given a JavaScript code. Simply copy and paste this tag on websites you wish to track and access your analytics reports in real-time. Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! @@ -30,14 +29,6 @@ Matomo aims to be a Free software alternative to Google Analytics and is already ![Screenshot of Matomo](./doc/screenshots/screenshot.png) -## Disclaimers / important information - -## Configuration - -1. The app will require to complete the registration process after the instllation is complete by **visiting the domain** on which Matomo is installed. -1. The MySQL database credentials will be sent to the **admin mail**. Fill these details while doing the registration process. -1. No LDAP support yet for the app. - ## Documentation and resources * Official app website: diff --git a/README_fr.md b/README_fr.md index b0a9091..e473fe9 100644 --- a/README_fr.md +++ b/README_fr.md @@ -6,6 +6,7 @@ It shall NOT be edited by hand. # Matomo pour YunoHost [![Niveau d’intégration](https://dash.yunohost.org/integration/matomo.svg)](https://dash.yunohost.org/appci/app/matomo) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/matomo.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/matomo.maintain.svg) + [![Installer Matomo avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=matomo) *[Read this readme in english.](./README.md)* @@ -15,9 +16,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po ## Vue d’ensemble -Matomo is the leading Free/Libre open analytics platform. - -Matomo is a full-featured PHP MySQL software program that you download and install on your own webserver. At the end of the five-minute installation process, you will be given a JavaScript code. Simply copy and paste this tag on websites you wish to track and access your analytics reports in real-time. +Matomo is the leading Free/Libre open analytics platform. At the end of the five-minute installation process, you will be given a JavaScript code. Simply copy and paste this tag on websites you wish to track and access your analytics reports in real-time. Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! @@ -30,14 +29,6 @@ Matomo aims to be a Free software alternative to Google Analytics and is already ![Capture d’écran de Matomo](./doc/screenshots/screenshot.png) -## Avertissements / informations importantes - -## Configuration - -1. Une fois l'installation terminée, l'application devra terminer le processus d'enregistrement en **visitant le domaine** sur lequel Matomo est installé. -1. Les informations d'identification de la base de données MySQL seront envoyées à **l'email admin**. Remplissez ces détails lors du processus d'inscription. -1. Le support LDAP n'est pas encore implémenté pour cette l'application. - ## Documentations et ressources * Site officiel de l’app : diff --git a/check_process b/check_process deleted file mode 100644 index 6076f60..0000000 --- a/check_process +++ /dev/null @@ -1,25 +0,0 @@ -;; Test complet - ; Manifest - domain="domain.tld" - path="/path" - is_public=1 - ; Checks - pkg_linter=1 - setup_sub_dir=1 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=1 - upgrade=1 - # 4.4.0~ynh1 - upgrade=1 from_commit=9edf3d60ea391925f835ece1309bbcb54e6d33fe - backup_restore=1 - multi_instance=1 - change_url=1 -;;; Options -Email=anmol@datamol.org -Notification=yes -;;; Upgrade options - ; commit=9edf3d60ea391925f835ece1309bbcb54e6d33fe - name= 4.4.0 - manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& \ No newline at end of file diff --git a/conf/app.src b/conf/app.src deleted file mode 100644 index 9140e90..0000000 --- a/conf/app.src +++ /dev/null @@ -1,7 +0,0 @@ -SOURCE_URL=https://builds.matomo.org/matomo-4.13.3.tar.gz -SOURCE_SUM=d7bcb4c45cba69afd9c849bd554bc88b8fc6971769c1f5aff997623bac05e0ac -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= -SOURCE_EXTRACT=true diff --git a/conf/cron b/conf/cron index d3bd95c..71a16d4 100644 --- a/conf/cron +++ b/conf/cron @@ -1,2 +1,2 @@ MAILTO="__EMAIL__" -5 * * * * __APP__ /usr/bin/php__PHPVERSION__ __FINALPATH__/console core:archive --url=https://__DOMAIN____PATH__ > /dev/null +5 * * * * __APP__ /usr/bin/php__PHPVERSION__ __INSTALL_DIR__/console core:archive --url=https://__DOMAIN____PATH__ > /dev/null diff --git a/conf/nginx.conf b/conf/nginx.conf index 8686306..a0d8c19 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,7 +2,7 @@ location ^~ __PATH__/ { # Path to source - alias __FINALPATH__/; + alias __INSTALL_DIR__/; more_set_headers "Referrer-Policy: origin always"; more_set_headers "X-Content-Type-Options: nosniff"; diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index ff369fa..8aed217 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1,5 +1,3 @@ -Matomo is the leading Free/Libre open analytics platform. - -Matomo is a full-featured PHP MySQL software program that you download and install on your own webserver. At the end of the five-minute installation process, you will be given a JavaScript code. Simply copy and paste this tag on websites you wish to track and access your analytics reports in real-time. +Matomo is the leading Free/Libre open analytics platform. At the end of the five-minute installation process, you will be given a JavaScript code. Simply copy and paste this tag on websites you wish to track and access your analytics reports in real-time. Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md deleted file mode 100644 index 0cb06eb..0000000 --- a/doc/DISCLAIMER.md +++ /dev/null @@ -1,5 +0,0 @@ -## Configuration - -1. The app will require to complete the registration process after the instllation is complete by **visiting the domain** on which Matomo is installed. -1. The MySQL database credentials will be sent to the **admin mail**. Fill these details while doing the registration process. -1. No LDAP support yet for the app. diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md deleted file mode 100644 index 737fcc0..0000000 --- a/doc/DISCLAIMER_fr.md +++ /dev/null @@ -1,5 +0,0 @@ -## Configuration - -1. Une fois l'installation terminée, l'application devra terminer le processus d'enregistrement en **visitant le domaine** sur lequel Matomo est installé. -1. Les informations d'identification de la base de données MySQL seront envoyées à **l'email admin**. Remplissez ces détails lors du processus d'inscription. -1. Le support LDAP n'est pas encore implémenté pour cette l'application. diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md new file mode 100644 index 0000000..fcbfce9 --- /dev/null +++ b/doc/POST_INSTALL.md @@ -0,0 +1,7 @@ +Once the installation is complete, the app will need to complete the registration process by visiting https://__DOMAIN____PATH__. + +Details for MySQL database to be enterted while registration process: + +- Database login: __DB_USER__ +- Database name: __DB_NAME__ +- Database password: __DB_PWD__ diff --git a/manifest.json b/manifest.json deleted file mode 100644 index 236407e..0000000 --- a/manifest.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "Matomo", - "id": "matomo", - "packaging_format": 1, - "description": { - "en": "Analytics platform for measuring Web statistics", - "fr": "Plateforme d'analyse de mesure de statistiques Web" - }, - "version": "4.13.3~ynh1", - "url": "https://matomo.org", - "upstream": { - "license": "GPL-3.0-or-later", - "website": "https://matomo.org", - "demo": "https://demo.matomo.org", - "admindoc": "https://matomo.org/docs", - "code": "https://github.com/matomo-org/matomo", - "cpe": "cpe:2.3:a:matomo:matomo" - }, - "license": "GPL-3.0-or-later", - "maintainer": { - "name": "Anmol Sharma", - "email": "anmol@datamol.org" - }, - "requirements": { - "yunohost": ">= 11.0.9" - }, - "multi_instance": true, - "services": [ - "nginx", - "php8.0-fpm", - "mysql" - ], - "arguments": { - "install": [ - { - "name": "domain", - "type": "domain" - }, - { - "name": "path", - "type": "path", - "example": "/matomo", - "default": "/matomo" - }, - { - "name": "is_public", - "type": "boolean", - "help": { - "en": "If enabled, Matomo will be accessible by people who do not have an account. This can be changed later via the webadmin.", - "fr": "Si cette case est cochée, Matomo sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." - }, - "default": true - }, - { - "name": "admin", - "type": "user" - } - ] - } -} \ No newline at end of file diff --git a/manifest.toml b/manifest.toml new file mode 100644 index 0000000..8d772ce --- /dev/null +++ b/manifest.toml @@ -0,0 +1,65 @@ +packaging_format = 2 + +id = "matomo" +name = "Matomo" +description.en = "Open source analytics platform for measuring Web statistics" +description.fr = "Plateforme d'analyse open source de mesure de statistiques Web" + +version = "4.13.3~ynh1" + +maintainers = ["Anmol Sharma"] + +[upstream] +license = "GPL-3.0-or-later" +website = "https://matomo.org" +demo = "https://demo.matomo.org" +admindoc = "https://matomo.org/docs" +code = "https://github.com/matomo-org/matomo" + +[integration] +yunohost = ">= 11.1.15" +architectures = "all" +multi_instance = true +ldap = false +sso = false +disk = "50M" +ram.build = "200M" +ram.runtime = "50M" + +[install] + [install.domain] + type = "domain" + + [install.path] + type = "path" + default = "/matomo" + + [install.init_main_permission] + help.en = "If enabled, Matomo will be accessible by people who do not have an account. This can be changed later via the webadmin." + help.fr = "Si cette case est cochée, Matomo sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." + type = "group" + default = "visitors" + + [install.admin] + type = "user" + +[resources] + + [resources.sources] + + [resources.sources.main] + url = "https://builds.matomo.org/matomo-4.13.3.tar.gz" + sha256 = "d7bcb4c45cba69afd9c849bd554bc88b8fc6971769c1f5aff997623bac05e0ac" + + [resources.system_user] + + [resources.install_dir] + + [resources.permissions] + main.url = "/" + + [resources.apt] + packages = "mariadb-server php8.1-curl php8.1-gd php8.1-cli php8.1-mysql php8.1-xml php8.1-mbstring" + + [resources.database] + type = "mysql" \ No newline at end of file diff --git a/scripts/_common.sh b/scripts/_common.sh index a60a9f5..944a65e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,11 +4,6 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION=8.0 - -# dependencies used by the app -pkg_dependencies="php$YNH_PHP_VERSION-curl php$YNH_PHP_VERSION-gd php$YNH_PHP_VERSION-cli php$YNH_PHP_VERSION-mysql php$YNH_PHP_VERSION-xml php$YNH_PHP_VERSION-mbstring" - #================================================= # PERSONAL HELPERS #================================================= @@ -20,60 +15,3 @@ pkg_dependencies="php$YNH_PHP_VERSION-curl php$YNH_PHP_VERSION-gd php$YNH_PHP_VE #================================================= # FUTURE OFFICIAL HELPERS #================================================= - -# Send an email to inform the administrator -# -# usage: ynh_send_readme_to_admin app_message [recipients] -# | arg: app_message - The message to send to the administrator. -# | arg: recipients - The recipients of this email. Use spaces to separate multiples recipients. - default: root -# example: "root admin@domain" -# If you give the name of a YunoHost user, ynh_send_readme_to_admin will find its email adress for you -# example: "root admin@domain user1 user2" -ynh_send_readme_to_admin() { - local app_message="${1:-...No specific information...}" - local recipients="${2:-root}" - - # Retrieve the email of users - find_mails () { - local list_mails="$1" - local mail - local recipients=" " - # Read each mail in argument - for mail in $list_mails - do - # Keep root or a real email address as it is - if [ "$mail" = "root" ] || echo "$mail" | grep --quiet "@" - then - recipients="$recipients $mail" - else - # But replace an user name without a domain after by its email - if mail=$(ynh_user_get_info "$mail" "mail" 2> /dev/null) - then - recipients="$recipients $mail" - fi - fi - done - echo "$recipients" - } - recipients=$(find_mails "$recipients") - - local mail_subject="☁️🆈🅽🅷☁️: \`$app\` has important message for you" - - local mail_message="This is an automated message from your beloved YunoHost server. -Specific information for the application $app. -$app_message ---- -Automatic diagnosis data from YunoHost -$(yunohost tools diagnosis | grep -B 100 "services:" | sed '/services:/d')" - - # Define binary to use for mail command - if [ -e /usr/bin/bsd-mailx ] - then - local mail_bin=/usr/bin/bsd-mailx - else - local mail_bin=/usr/bin/mail.mailutils - fi - - # Send the email to the recipients - echo "$mail_message" | $mail_bin -a "Content-Type: text/plain; charset=UTF-8" -s "$mail_subject" "$recipients" -} diff --git a/scripts/backup b/scripts/backup index b5fb7bd..35afc88 100755 --- a/scripts/backup +++ b/scripts/backup @@ -10,25 +10,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_print_info --message="Loading installation settings..." - -app=$YNH_APP_INSTANCE_NAME - -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -domain=$(ynh_app_setting_get --app=$app --key=domain) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= @@ -38,7 +19,7 @@ ynh_print_info --message="Declaring files to be backed up..." # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$final_path" +ynh_backup --src_path="$install_dir" #================================================= # BACKUP THE NGINX CONFIGURATION diff --git a/scripts/change_url b/scripts/change_url index 6c40b4f..d0bd2fd 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -9,91 +9,12 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -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_script_progression --message="Loading installation settings..." --weight=1 - -# Needed for helper "ynh_add_nginx_config" -final_path=$(ynh_app_setting_get --app=$app --key=final_path) - -# Add settings here as needed by your application -admin=$(ynh_app_setting_get --app=$app --key=admin) -email=$(ynh_user_get_info --username=$admin --key=mail) - -#================================================= -# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # Remove the new domain config file, the remove script won't do it as it doesn't know yet its location. - ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" - - # Restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# 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 - #================================================= # MODIFY URL IN NGINX CONF #================================================= ynh_script_progression --message="Updating NGINX web server configuration..." --weight=3 -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 --file="$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 --file="$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 --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" -fi +ynh_change_url_nginx_config #================================================= # SETUP A CRON @@ -107,13 +28,6 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/install b/scripts/install index 028aaf7..04e07ac 100755 --- a/scripts/install +++ b/scripts/install @@ -9,88 +9,25 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -domain=$YNH_APP_ARG_DOMAIN -path_url=$YNH_APP_ARG_PATH -is_public=$YNH_APP_ARG_IS_PUBLIC -admin=$YNH_APP_ARG_ADMIN - -app=$YNH_APP_INSTANCE_NAME - email=$(ynh_user_get_info --username=$admin --key=mail) fpm_footprint="low" fpm_free_footprint=0 fpm_usage="low" -#================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#================================================= -ynh_script_progression --message="Validating installation parameters..." --weight=1 - -final_path=/var/www/$app -test ! -e "$final_path" || ynh_die --message="This path already contains a folder" - -# Register (book) web path -ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= -ynh_script_progression --message="Storing installation settings..." --weight=1 - -ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint -ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint -ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage - -#================================================= -# INSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Installing dependencies..." --weight=1 - -ynh_install_app_dependencies $pkg_dependencies - -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=1 - -# Create a system user -ynh_system_user_create --username=$app --home_dir="$final_path" - -#================================================= -# CREATE A MYSQL DATABASE -#================================================= -ynh_script_progression --message="Creating a MySQL database..." --weight=1 - -db_name=$(ynh_sanitize_dbid --db_name=$app) -db_user=$db_name -ynh_app_setting_set --app=$app --key=db_name --value=$db_name -ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression --message="Setting up source files..." --weight=4 -ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$final_path" +ynh_setup_source --dest_dir="$install_dir" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # PHP-FPM CONFIGURATION @@ -120,46 +57,6 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Configuring permissions..." --weight=1 - -# Make app public if necessary -if [ $is_public -eq 1 ] -then - # Everyone can access the app. - # The "main" permission is automatically created before the install script. - ynh_permission_update --permission="main" --add="visitors" -fi - -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -ynh_systemd_action --service_name=nginx --action=reload - -#================================================= -# SEND A README FOR THE ADMIN -#================================================= -ynh_script_progression --message="Sending a readme for the admin..." --weight=1 - -message="Matomo was successfully installed - -Please open your $app domain: https://$domain$path_url - -Complete the registration process from the setup page displayed. -Details for MySQL database to be enterted while registration process: - -Database login: $db_user -Database name: $db_name -Database password: $db_pwd - -If you are facing any problem or want to improve this app, please open a new issue here: https://github.com/YunoHost-Apps/matomo_ynh/issues" - -ynh_send_readme_to_admin "$message" - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index 0269a3d..3242cce 100755 --- a/scripts/remove +++ b/scripts/remove @@ -9,36 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -final_path=$(ynh_app_setting_get --app=$app --key=final_path) - -#================================================= -# STANDARD REMOVE -#================================================= -# REMOVE THE MYSQL DATABASE -#================================================= -ynh_script_progression --message="Removing the MySQL database..." --weight=1 - -# Remove a database if it exists, along with the associated user -ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name - -#================================================= -# REMOVE APP MAIN DIR -#================================================= -ynh_script_progression --message="Removing app main directory..." --weight=2 - -# Remove the app directory securely -ynh_secure_remove --file="$final_path" - #================================================= # REMOVE NGINX CONFIGURATION #================================================= @@ -55,14 +25,6 @@ ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1 # Remove the dedicated PHP-FPM config ynh_remove_fpm_config -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - #================================================= # SPECIFIC REMOVE #================================================= @@ -73,16 +35,6 @@ ynh_script_progression --message="Removing various files..." --weight=1 # Remove a cron file ynh_secure_remove --file="/etc/cron.d/$app" -#================================================= -# GENERIC FINALIZATION -#================================================= -# REMOVE DEDICATED USER -#================================================= -ynh_script_progression --message="Removing the dedicated system user..." --weight=1 - -# Delete a system user -ynh_system_user_delete --username=$app - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index c078c92..a242a22 100755 --- a/scripts/restore +++ b/scripts/restore @@ -10,66 +10,15 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - -fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) -fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) - -#================================================= -# CHECK IF THE APP CAN BE RESTORED -#================================================= -ynh_script_progression --message="Validating restoration parameters..." --weight=1 - -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " - -#================================================= -# STANDARD RESTORATION STEPS -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 - -# Create the dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" - #================================================= # RESTORE THE APP MAIN DIR #================================================= ynh_script_progression --message="Restoring the app main directory..." --weight=3 -ynh_restore_file --origin_path="$final_path" +ynh_restore_file --origin_path="$install_dir" -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" - -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=1 - -# Define and install dependencies -ynh_install_app_dependencies $pkg_dependencies +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # RESTORE THE PHP-FPM CONFIGURATION @@ -79,9 +28,6 @@ ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weig # Restore the file first, so it can have a backup if different ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -# Recreate a dedicated php-fpm config -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion - #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= @@ -94,8 +40,6 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= ynh_script_progression --message="Restoring the MySQL database..." --weight=1 -db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) -ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index d62db49..dbc226f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,101 +9,35 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." --weight=1 - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -admin=$(ynh_app_setting_get --app=$app --key=admin) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - -email=$(ynh_user_get_info --username=$admin --key=mail) -fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) -fpm_free_footprint=$(ynh_app_setting_get --app=$app --key=fpm_free_footprint) -fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) - #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=3 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # Restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 # If fpm_footprint doesn't exist, create it -if [ -z "$fpm_footprint" ]; then +if [ -z "${fpm_footprint:-}" ]; then fpm_footprint=low ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint fi # If fpm_free_footprint doesn't exist, create it -if [ -z "$fpm_free_footprint" ]; then +if [ -z "${fpm_free_footprint:-}" ]; then fpm_free_footprint=0 ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint fi # If fpm_usage doesn't exist, create it -if [ -z "$fpm_usage" ]; then +if [ -z "${fpm_usage:-}" ]; then fpm_usage=low ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage fi -# Cleaning legacy permissions -if ynh_legacy_permissions_exists; then - ynh_legacy_permissions_delete_all - - ynh_app_setting_delete --app=$app --key=is_public -fi - -# If db_name doesn't exist, create it -if [ -z "$db_name" ]; then - db_name=$(ynh_sanitize_dbid --db_name=$app) - ynh_app_setting_set --app=$app --key=db_name --value=$db_name -fi - -# If final_path doesn't exist, create it -if [ -z "$final_path" ]; then - final_path=/var/www/$app - ynh_app_setting_set --app=$app --key=final_path --value=$final_path -fi - -# If admin doesn't exist -if [ -z "$admin" ]; then - email=root@$domain -fi - -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 - -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir="$final_path" - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -112,30 +46,22 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=3 - if [[ ! -f "$final_path/config/config.ini.php" ]]; then + if [[ ! -f "$install_dir/config/config.ini.php" ]]; then # config.ini.php is only created during the post-install process... # it is therefore not present when the CI tests are carried out... # This condition is only for CI test to go through the upgrade process - ynh_setup_source --dest_dir="$final_path" + ynh_setup_source --dest_dir="$install_dir" else # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="config/config.ini.php" + ynh_setup_source --dest_dir="$install_dir" --keep="config/config.ini.php" - chown -R $app:www-data "$final_path" - ynh_exec_as $app php${phpversion} $final_path/console core:update -n + chown -R $app:www-data "$install_dir" + ynh_exec_as $app php${phpversion} $install_dir/console core:update -n fi fi -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" - -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=1 - -ynh_install_app_dependencies $pkg_dependencies +chmod -R o-rwx "$install_dir" +chown -R $app:www-data "$install_dir" #================================================= # PHP-FPM CONFIGURATION @@ -144,36 +70,14 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) - -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# SPECIFIC UPGRADE -#================================================= -# SETUP A CRON -#================================================= -ynh_script_progression --message="Setuping a cron..." --weight=1 - ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." --weight=1 - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/tests.toml b/tests.toml new file mode 100644 index 0000000..9e01410 --- /dev/null +++ b/tests.toml @@ -0,0 +1,9 @@ +test_format = 1.0 + +[default] + + # ------------------------------- + # Commits to test upgrade from + # ------------------------------- + + test_upgrade_from.9edf3d60.name = "Upgrade from 4.4.0" \ No newline at end of file From 1040e3b64f4d692b9dc0bf9ef66d1debbf1c7bcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 13 Mar 2023 22:13:35 +0100 Subject: [PATCH 31/48] Update upgrade --- scripts/upgrade | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index dbc226f..20ed743 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,6 +9,8 @@ source _common.sh source /usr/share/yunohost/helpers +email=$(ynh_user_get_info --username=$admin --key=mail) + #================================================= # CHECK VERSION #================================================= From cbb29224b2eb64f8f606b4528453368847e4334b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 13 Mar 2023 22:14:59 +0100 Subject: [PATCH 32/48] fix --- scripts/change_url | 2 ++ scripts/upgrade | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index d0bd2fd..5d55828 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -9,6 +9,8 @@ source _common.sh source /usr/share/yunohost/helpers +email=$(ynh_user_get_info --username=$admin --key=mail) + #================================================= # MODIFY URL IN NGINX CONF #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 20ed743..dbc226f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,8 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -email=$(ynh_user_get_info --username=$admin --key=mail) - #================================================= # CHECK VERSION #================================================= From d9c0ae0840bf5d485091101dea55be9ceee684d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 20 Mar 2023 18:08:50 +0100 Subject: [PATCH 33/48] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 8d772ce..55bbe4e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Matomo" description.en = "Open source analytics platform for measuring Web statistics" description.fr = "Plateforme d'analyse open source de mesure de statistiques Web" -version = "4.13.3~ynh1" +version = "4.14.0~ynh1" maintainers = ["Anmol Sharma"] @@ -48,8 +48,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://builds.matomo.org/matomo-4.13.3.tar.gz" - sha256 = "d7bcb4c45cba69afd9c849bd554bc88b8fc6971769c1f5aff997623bac05e0ac" + url = "https://builds.matomo.org/matomo-4.14.0.tar.gz" + sha256 = "76400edaa4d281b63faa1d6e15497438c5e66011d5807bd98bcf4bc4589cdc1d" [resources.system_user] From df117354039aa8fb324dead9736f7d28de830805 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 20 Mar 2023 17:08:56 +0000 Subject: [PATCH 34/48] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a5980e7..291ca0a 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Matomo is the leading Free/Libre open analytics platform. At the end of the five Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Shipped version:** 4.13.3~ynh1 +**Shipped version:** 4.14.0~ynh1 **Demo:** https://demo.matomo.org diff --git a/README_fr.md b/README_fr.md index e473fe9..dddb40f 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,7 +21,7 @@ Matomo is the leading Free/Libre open analytics platform. At the end of the five Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Version incluse :** 4.13.3~ynh1 +**Version incluse :** 4.14.0~ynh1 **Démo :** https://demo.matomo.org From 7b75b07f4d3cbe52d918f5a5630822cf18bafdf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 20 Mar 2023 18:09:17 +0100 Subject: [PATCH 35/48] Update manifest.toml --- manifest.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 55bbe4e..ed7206c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -62,4 +62,5 @@ ram.runtime = "50M" packages = "mariadb-server php8.1-curl php8.1-gd php8.1-cli php8.1-mysql php8.1-xml php8.1-mbstring" [resources.database] - type = "mysql" \ No newline at end of file + type = "mysql" + \ No newline at end of file From b1d4d56b8bff1b1209972a1aed545b69d3c51acd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 20 Mar 2023 18:11:06 +0100 Subject: [PATCH 36/48] Fix --- scripts/install | 1 - scripts/upgrade | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 04e07ac..80e603b 100755 --- a/scripts/install +++ b/scripts/install @@ -36,7 +36,6 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=3 # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # NGINX CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index dbc226f..9372b2d 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,6 +15,8 @@ source /usr/share/yunohost/helpers upgrade_type=$(ynh_check_app_version_changed) +email=$(ynh_user_get_info --username=$admin --key=mail) + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= From a7fcf771f9c2059d94bcb6fa3558da7c3afe74b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 20 Mar 2023 18:15:32 +0100 Subject: [PATCH 37/48] Update install --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 80e603b..29092f6 100755 --- a/scripts/install +++ b/scripts/install @@ -14,6 +14,7 @@ source /usr/share/yunohost/helpers #================================================= email=$(ynh_user_get_info --username=$admin --key=mail) + fpm_footprint="low" fpm_free_footprint=0 fpm_usage="low" From 74de7dbb43c3183641ec4c637988be3d6d5683b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 20 Mar 2023 20:10:24 +0100 Subject: [PATCH 38/48] fix --- conf/cron | 1 - scripts/upgrade | 2 -- 2 files changed, 3 deletions(-) diff --git a/conf/cron b/conf/cron index 71a16d4..c4274c5 100644 --- a/conf/cron +++ b/conf/cron @@ -1,2 +1 @@ -MAILTO="__EMAIL__" 5 * * * * __APP__ /usr/bin/php__PHPVERSION__ __INSTALL_DIR__/console core:archive --url=https://__DOMAIN____PATH__ > /dev/null diff --git a/scripts/upgrade b/scripts/upgrade index 9372b2d..dbc226f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,8 +15,6 @@ source /usr/share/yunohost/helpers upgrade_type=$(ynh_check_app_version_changed) -email=$(ynh_user_get_info --username=$admin --key=mail) - #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= From 867104cc11c2dc1202462670ba63e2799dae43e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 3 Apr 2023 21:29:05 +0200 Subject: [PATCH 39/48] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index ed7206c..093128f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ admindoc = "https://matomo.org/docs" code = "https://github.com/matomo-org/matomo" [integration] -yunohost = ">= 11.1.15" +yunohost = ">= 11.1.16" architectures = "all" multi_instance = true ldap = false From 09a80692be548deb736a0e6c4b075680e4256baa Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 8 Apr 2023 09:32:23 +0200 Subject: [PATCH 40/48] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 093128f..25e381d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ admindoc = "https://matomo.org/docs" code = "https://github.com/matomo-org/matomo" [integration] -yunohost = ">= 11.1.16" +yunohost = ">= 11.1.17" architectures = "all" multi_instance = true ldap = false From 33b73919f61da021087361a1736d2c892c79fa78 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 8 Apr 2023 09:34:35 +0200 Subject: [PATCH 41/48] cleaning --- scripts/install | 12 ------------ scripts/remove | 12 ------------ scripts/restore | 24 +++++++----------------- 3 files changed, 7 insertions(+), 41 deletions(-) diff --git a/scripts/install b/scripts/install index 29092f6..8bc9dc3 100755 --- a/scripts/install +++ b/scripts/install @@ -38,21 +38,9 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=3 # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=2 - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# SPECIFIC SETUP -#================================================= -# SETUP A CRON -#================================================= -ynh_script_progression --message="Setuping a cron..." --weight=1 - ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" diff --git a/scripts/remove b/scripts/remove index 3242cce..a18a484 100755 --- a/scripts/remove +++ b/scripts/remove @@ -17,21 +17,9 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# REMOVE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Removing PHP-FPM configuration..." --weight=1 - # Remove the dedicated PHP-FPM config ynh_remove_fpm_config -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE VARIOUS FILES -#================================================= -ynh_script_progression --message="Removing various files..." --weight=1 - # Remove a cron file ynh_secure_remove --file="/etc/cron.d/$app" diff --git a/scripts/restore b/scripts/restore index a242a22..71a355d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -20,21 +20,6 @@ ynh_restore_file --origin_path="$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=2 - -# Restore the file first, so it can have a backup if different -ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" - -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX configuration..." --weight=1 - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RESTORE THE MYSQL DATABASE #================================================= @@ -43,9 +28,14 @@ ynh_script_progression --message="Restoring the MySQL database..." --weight=1 ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql #================================================= -# RESTORE VARIOUS FILES +# RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Restoring various files..." --weight=1 +ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=2 + +# Restore the file first, so it can have a backup if different +ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/cron.d/$app" chown root: "/etc/cron.d/$app" From 64e3c112f1943f72625a87f1b8d789be80d29701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 18 Apr 2023 12:19:33 +0200 Subject: [PATCH 42/48] Update manifest.toml --- manifest.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 25e381d..5de0abe 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Matomo" description.en = "Open source analytics platform for measuring Web statistics" description.fr = "Plateforme d'analyse open source de mesure de statistiques Web" -version = "4.14.0~ynh1" +version = "4.14.2~ynh1" maintainers = ["Anmol Sharma"] @@ -48,8 +48,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://builds.matomo.org/matomo-4.14.0.tar.gz" - sha256 = "76400edaa4d281b63faa1d6e15497438c5e66011d5807bd98bcf4bc4589cdc1d" + url = "https://builds.matomo.org/matomo-4.14.2.tar.gz" + sha256 = "8cfb3fe1b82ded5a9e4a878b9f01ebf85238dba84087088ff117224033700a9a" [resources.system_user] From b863a8423dafe257eaad4bd508e53108266e32c8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 18 Apr 2023 10:19:37 +0000 Subject: [PATCH 43/48] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 291ca0a..f8aff19 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Matomo is the leading Free/Libre open analytics platform. At the end of the five Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Shipped version:** 4.14.0~ynh1 +**Shipped version:** 4.14.2~ynh1 **Demo:** https://demo.matomo.org diff --git a/README_fr.md b/README_fr.md index dddb40f..18c963a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,7 +21,7 @@ Matomo is the leading Free/Libre open analytics platform. At the end of the five Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Version incluse :** 4.14.0~ynh1 +**Version incluse :** 4.14.2~ynh1 **Démo :** https://demo.matomo.org From c4623a91ff1d8a9cd7ff941009b7458c50048a86 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 13 May 2023 08:17:00 +0200 Subject: [PATCH 44/48] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 5de0abe..d40e82a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ admindoc = "https://matomo.org/docs" code = "https://github.com/matomo-org/matomo" [integration] -yunohost = ">= 11.1.17" +yunohost = ">= 11.1.19" architectures = "all" multi_instance = true ldap = false From b9fe0a4f2d86b6ceda4d99433d142bc82109c11d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 21 Jun 2023 09:34:50 +0200 Subject: [PATCH 45/48] Update manifest.toml --- manifest.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index d40e82a..061e087 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ admindoc = "https://matomo.org/docs" code = "https://github.com/matomo-org/matomo" [integration] -yunohost = ">= 11.1.19" +yunohost = ">= 11.1.21" architectures = "all" multi_instance = true ldap = false @@ -59,7 +59,7 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "mariadb-server php8.1-curl php8.1-gd php8.1-cli php8.1-mysql php8.1-xml php8.1-mbstring" + packages = "mariadb-server php8.2-curl php8.2-gd php8.2-cli php8.2-mysql php8.2-xml php8.2-mbstring" [resources.database] type = "mysql" From 304a584f401cfe5c43039722b04745ba208a09be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 6 Jul 2023 20:03:54 +0200 Subject: [PATCH 46/48] Update manifest.toml --- manifest.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.toml b/manifest.toml index 061e087..787fed8 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,9 +5,9 @@ name = "Matomo" description.en = "Open source analytics platform for measuring Web statistics" description.fr = "Plateforme d'analyse open source de mesure de statistiques Web" -version = "4.14.2~ynh1" +version = "4.15.0~ynh1" -maintainers = ["Anmol Sharma"] +maintainers = [] [upstream] license = "GPL-3.0-or-later" @@ -48,8 +48,8 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] - url = "https://builds.matomo.org/matomo-4.14.2.tar.gz" - sha256 = "8cfb3fe1b82ded5a9e4a878b9f01ebf85238dba84087088ff117224033700a9a" + url = "https://builds.matomo.org/matomo-4.15.0.tar.gz" + sha256 = "619b2ef500e1c50f4ccee2e094ddfa0928cf8e76fe40b787483c1d11ee69978e" [resources.system_user] From c92a8d893f1b20dfe9ef18acd6ab404704951a30 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Thu, 6 Jul 2023 18:03:59 +0000 Subject: [PATCH 47/48] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f8aff19..bc551e2 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Matomo is the leading Free/Libre open analytics platform. At the end of the five Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Shipped version:** 4.14.2~ynh1 +**Shipped version:** 4.15.0~ynh1 **Demo:** https://demo.matomo.org diff --git a/README_fr.md b/README_fr.md index 18c963a..7ba8467 100644 --- a/README_fr.md +++ b/README_fr.md @@ -21,7 +21,7 @@ Matomo is the leading Free/Libre open analytics platform. At the end of the five Matomo aims to be a Free software alternative to Google Analytics and is already used on more than 1,400,000 websites. Privacy is built-in! -**Version incluse :** 4.14.2~ynh1 +**Version incluse :** 4.15.0~ynh1 **Démo :** https://demo.matomo.org From 82a9ef3a5800f830da00b3cae3240657ffa730b4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 25 Jul 2023 15:48:39 +0200 Subject: [PATCH 48/48] Remove the config panel, the whole php fpm config panel is a broken mess, we should just implement it in the core once and for all ... --- config_panel.toml | 30 --------------- scripts/config | 95 ----------------------------------------------- 2 files changed, 125 deletions(-) delete mode 100644 config_panel.toml delete mode 100644 scripts/config diff --git a/config_panel.toml b/config_panel.toml deleted file mode 100644 index e8cbab8..0000000 --- a/config_panel.toml +++ /dev/null @@ -1,30 +0,0 @@ -version = "1.0" - -[main] -name = "Matomo configuration" - - [main.php_fpm_config] - name = "PHP-FPM configuration" - - [main.php_fpm_config.fpm_footprint] - ask = "Memory footprint" - type = "select" - choices.low = "Low, <= 20Mb per pool" - choices.medium = "Medium, between 20Mb and 40Mb per pool" - choices.high = "High, > 40Mb per pool" - choices.specific = "Use specific value" - default = "low" - - [main.php_fpm_config.fpm_free_footprint] - visible = "fpm_footprint == 'specific'" - ask = "Memory footprint of the service?" - type = "number" - default = "0" - help = "Free field to specify exactly the footprint in Mb if you don't want to use one of the three previous values." - - [main.php_fpm_config.fpm_usage] - ask = "Expected usage" - type = "select" - choices = ["low", "medium", "high"] - default = "low" - help = "low: Personal usage, behind the SSO. No RAM footprint when not used, but the impact on the processor can be high if many users are using the service.
medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.
high: High usage, frequently visited website. High RAM footprint, but lower on processor usage and quickly responding." diff --git a/scripts/config b/scripts/config deleted file mode 100644 index 91c2de7..0000000 --- a/scripts/config +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/bash - -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - -source _common.sh -source /usr/share/yunohost/helpers - -ynh_abort_if_errors - -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -current_fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) - -#================================================= -# SPECIFIC GETTERS FOR TOML SHORT KEY -#================================================= - -get__fpm_footprint() { - # Free footprint value for php-fpm - # Check if current_fpm_footprint is an integer - if [ "$current_fpm_footprint" -eq "$current_fpm_footprint" ] 2> /dev/null - then - echo "specific" - else - echo "$current_fpm_footprint" - fi -} - -get__free_footprint() { - # Free footprint value for php-fpm - # Check if current_fpm_footprint is an integer - if [ "$current_fpm_footprint" -eq "$current_fpm_footprint" ] 2> /dev/null - then - # If current_fpm_footprint is an integer, that's a numeric value for the footprint - echo "$current_fpm_footprint" - else - echo "0" - fi -} - -#================================================= -# SPECIFIC SETTERS FOR TOML SHORT KEYS -#================================================= - -set__fpm_footprint() { - if [ "$fpm_footprint" != "specific" ] - then - ynh_app_setting_set --app=$app --key=fpm_footprint --value="$fpm_footprint" - fi -} - -set__fpm_free_footprint() { - if [ "$fpm_footprint" = "specific" ] - then - ynh_app_setting_set --app=$app --key=fpm_footprint --value="$fpm_free_footprint" - fi -} - -#================================================= -# GENERIC FINALIZATION -#================================================= - -ynh_app_config_validate() { - _ynh_app_config_validate - - if [ "${changed[fpm_usage]}" == "true" ] || [ "${changed[fpm_footprint]}" == "true" ] || [ "${changed[fpm_free_footprint]}" == "true" ]; then - # If fpm_footprint is set to 'specific', use $fpm_free_footprint value. - if [ "$fpm_footprint" = "specific" ] - then - fpm_footprint=$fpm_free_footprint - fi - - if [ "$fpm_footprint" == "0" ] - then - ynh_print_err --message="When selecting 'specific', you have to set a footprint value into the field below." - - exit 0 - fi - fi -} - -ynh_app_config_apply() { - _ynh_app_config_apply - - ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint -} - -ynh_app_config_run $1