From cc43055739d722846c9d340b508529495a76593c Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 9 Dec 2020 13:34:21 +0100 Subject: [PATCH 01/28] Update manifest.json to right licence https://www.zabbix.com/license --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 1efefd3..48daedf 100644 --- a/manifest.json +++ b/manifest.json @@ -8,7 +8,7 @@ }, "version": "4.4~ynh1", "url": "https://www.zabbix.com", - "license": "free", + "license": " LGPL-2.0-or-later", "maintainer": { "name": "Mickael Martin", "email": "mickael@librement-votre.fr", From 659240cd1e54e29a7fc5a56a3b7332f329e2cae6 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 9 Dec 2020 13:35:35 +0100 Subject: [PATCH 02/28] Update manifest.json to require 3.8.1 min yunohost version --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 48daedf..3ea3116 100644 --- a/manifest.json +++ b/manifest.json @@ -15,7 +15,7 @@ "url": "http://www.librement-votre.fr" }, "requirements": { - "yunohost": ">= 3.6.5" + "yunohost": ">= 3.8.1" }, "multi_instance": false, "services": [ From 32e536c22e5ba30d681a2e8d7c8d82f014c93ba2 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 9 Dec 2020 13:36:06 +0100 Subject: [PATCH 03/28] delete ynh_delete_file_checksum -> helper official in 3.3.1 --- scripts/_common.sh | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 53ef3b2..deecdd9 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,17 +1,5 @@ #!/bin/bash -# ============= FUTURE YUNOHOST HELPER ============= -# Delete a file checksum from the app settings -# -# $app should be defined when calling this helper -# -# usage: ynh_remove_file_checksum file -# | arg: file - The file for which the checksum will be deleted -ynh_delete_file_checksum () { - local checksum_setting_name=checksum_${1//[\/ ]/_} # Replace all '/' and ' ' by '_' - ynh_app_setting_delete $app $checksum_setting_name -} - #Zabbix part #===================GET GUEST DEFAULT USER STATE============== #return 0 if enable, else 1 From 3e1d9d16b3c07ff3fe34ce6a7d67ad1f330e5397 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 9 Dec 2020 13:41:26 +0100 Subject: [PATCH 04/28] clean url parameters --- scripts/install | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index bf67a30..2f263d9 100644 --- a/scripts/install +++ b/scripts/install @@ -46,13 +46,10 @@ app="$YNH_APP_INSTANCE_NAME" final_path=/var/www/zabbix test ! -e "$final_path" || ynh_die "This path already contains a folder" -# Normalize the url path syntax -path_url=$(ynh_normalize_url_path "$path_url") - # Check web path availability -ynh_webpath_available "$domain" "$path_url" +ynh_webpath_available --domain="$domain" --path_url="$path_url" # Register (book) web path -ynh_webpath_register "$app" "$domain" "$path_url" +ynh_webpath_register --app="$app" --domain="$domain" --path_url="$path_url" #================================================= # STORE SETTINGS FROM MANIFEST From c9f9bf45fdb20ad120ac88a6604eeb5bb073897a Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 9 Dec 2020 13:43:36 +0100 Subject: [PATCH 05/28] Update install to php 7.3 --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 2f263d9..21e6dad 100644 --- a/scripts/install +++ b/scripts/install @@ -101,7 +101,7 @@ install_zabbix_repo ynh_script_progression --message="Update and install dependencies" -w 5 #ynh_package_update no need cause ynh_install_app_dependencies after -ynh_install_app_dependencies libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php7.0 php-bcmath php7.0-bcmath ttf-dejavu-core php7.0-bcmath patch smistrip unzip wget fping libcap2-bin libiksemel3 libopenipmi0 libpam-cap libsnmp-base libsnmp30 snmptrapd snmpd libjs-prototype jq zabbix-server-mysql zabbix-agent zabbix-frontend-php +ynh_install_app_dependencies libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php7.3 php7.3-bcmath ttf-dejavu-core php7.3-bcmath patch smistrip unzip wget fping libcap2-bin libiksemel3 libopenipmi0 libpam-cap libsnmp-base libsnmp30 snmptrapd snmpd libjs-prototype jq zabbix-server-mysql zabbix-agent zabbix-frontend-php dpkg -i --force-confmiss /var/cache/apt/archives/zabbix-server-mysql* ynh_replace_string --match_string="# fr_FR.UTF-8 UTF-8" --replace_string="fr_FR.UTF-8 UTF-8" --target_file=/etc/locale.gen @@ -368,7 +368,7 @@ ynh_app_setting_set "$app" unprotected_uris "/" #================================================= systemctl reload nginx -systemctl reload php7.0-fpm +systemctl reload php7.3-fpm # Reload SSOwat config yunohost app ssowatconf @@ -405,7 +405,7 @@ fi #================================================= systemctl reload nginx -systemctl reload php7.0-fpm +systemctl reload php7.3-fpm # Reload SSOwat config yunohost app ssowatconf From 224eb0d63290dc57c88d95e291a6081bcb47c81d Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 9 Dec 2020 13:45:24 +0100 Subject: [PATCH 06/28] Update dependencies --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index eaf8e5f..5f2fe72 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -152,7 +152,7 @@ then ynh_package_remove zabbix-server-mysql zabbix-frontend-php ynh_print_info "Update zabbix via apt package" - ynh_install_app_dependencies libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 ttf-dejavu-core php7.0-bcmath patch smistrip unzip wget fping libcap2-bin libiksemel3 libopenipmi0 libpam-cap libsnmp-base libsnmp30 snmptrapd snmpd libjs-prototype jq zabbix-server-mysql zabbix-agent zabbix-frontend-php + ynh_install_app_dependencies libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php7.3 php7.3-bcmath ttf-dejavu-core php7.3-bcmath patch smistrip unzip wget fping libcap2-bin libiksemel3 libopenipmi0 libpam-cap libsnmp-base libsnmp30 snmptrapd snmpd libjs-prototype jq zabbix-server-mysql zabbix-agent zabbix-frontend-php ynh_secure_remove /usr/share/zabbix/conf/zabbix.conf.php cp -rpf /tmp/zabbix /etc/ From 19abe8e8cb4df2e5eb3681ec7baf0f737eac5c01 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 9 Dec 2020 13:45:49 +0100 Subject: [PATCH 07/28] Update dependcies --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 939df04..5cce2b6 100644 --- a/scripts/restore +++ b/scripts/restore @@ -56,7 +56,7 @@ install_zabbix_repo ynh_print_info "Update and install dependencies" ynh_package_update -ynh_install_app_dependencies libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php7.0 php-bcmath php7.0-bcmath ttf-dejavu-core php7.0-bcmath patch smistrip unzip wget fping libcap2-bin libiksemel3 libopenipmi0 libpam-cap libsnmp-base libsnmp30 snmptrapd snmpd libjs-prototype jq zabbix-server-mysql zabbix-agent zabbix-frontend-php +ynh_install_app_dependencies libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php7.3 php7.3-bcmath ttf-dejavu-core php7.3-bcmath patch smistrip unzip wget fping libcap2-bin libiksemel3 libopenipmi0 libpam-cap libsnmp-base libsnmp30 snmptrapd snmpd libjs-prototype jq zabbix-server-mysql zabbix-agent zabbix-frontend-php DEBIAN_FRONTEND=noninteractive apt-mark hold zabbix-server-mysql zabbix-frontend-php From f176b6f5aa690f17eefee22c4cefb772bbc2f9da Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 9 Dec 2020 13:47:06 +0100 Subject: [PATCH 08/28] delete ynh_normalize_url_path --- scripts/upgrade | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 5f2fe72..369df3f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -86,13 +86,6 @@ disable_admin_user #================================================= disable_guest_user -#================================================= -# CHECK THE PATH -#================================================= - -# Normalize the URL path syntax -path_url=$(ynh_normalize_url_path "$path_url") - #Patch timeout too short for zabbix agent if needed change_timeoutAgent From 3c5355da49f5a0cbb62f020aab0f5ed040f2a612 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 9 Dec 2020 13:49:47 +0100 Subject: [PATCH 09/28] add --quiet to systemctl enable --- scripts/restore | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index 5cce2b6..7a6bb3e 100644 --- a/scripts/restore +++ b/scripts/restore @@ -119,9 +119,9 @@ ynh_restore_file "/etc/apt/apt.conf.d/100update_force_init_zabbix_frontend_confi if [ ! -L /etc/zabbix/zabbix_agentd.d ];then ln -s /etc/zabbix/zabbix_agentd.conf.d /etc/zabbix/zabbix_agentd.d fi -systemctl enable zabbix-agent && systemctl restart zabbix-agent +systemctl enable --quiet zabbix-agent && systemctl restart zabbix-agent change_timeoutAgent -systemctl enable zabbix-server && systemctl restart zabbix-server +systemctl enable --quiet zabbix-server && systemctl restart zabbix-server yunohost service add snmpd -d "Management of SNMP Daemon" yunohost service add zabbix-server -d "Management Zabbix server daemon : Collect, agregate, compute and notify" From 30e4a8583c23e7d012e7865724becd24bbfb50e0 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 9 Dec 2020 13:53:32 +0100 Subject: [PATCH 10/28] add pkg_dependencies variable --- scripts/_common.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/_common.sh b/scripts/_common.sh index deecdd9..d48999c 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,5 +1,11 @@ #!/bin/bash +#================================================= +# COMMON VARIABLES +#================================================= + +pkg_dependencies="libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php7.3 php7.3-bcmath ttf-dejavu-core php7.3-bcmath patch smistrip unzip wget fping libcap2-bin libiksemel3 libopenipmi0 libpam-cap libsnmp-base libsnmp30 snmptrapd snmpd libjs-prototype jq zabbix-server-mysql zabbix-agent zabbix-frontend-php" + #Zabbix part #===================GET GUEST DEFAULT USER STATE============== #return 0 if enable, else 1 From d0a1caebcf8eacd70df3ea214a259010e4e8d9d9 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 9 Dec 2020 13:54:41 +0100 Subject: [PATCH 11/28] ynh_install_app_dependencies $pkg_dependencies --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 21e6dad..9c120c1 100644 --- a/scripts/install +++ b/scripts/install @@ -101,7 +101,7 @@ install_zabbix_repo ynh_script_progression --message="Update and install dependencies" -w 5 #ynh_package_update no need cause ynh_install_app_dependencies after -ynh_install_app_dependencies libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php7.3 php7.3-bcmath ttf-dejavu-core php7.3-bcmath patch smistrip unzip wget fping libcap2-bin libiksemel3 libopenipmi0 libpam-cap libsnmp-base libsnmp30 snmptrapd snmpd libjs-prototype jq zabbix-server-mysql zabbix-agent zabbix-frontend-php +ynh_install_app_dependencies $pkg_dependencies dpkg -i --force-confmiss /var/cache/apt/archives/zabbix-server-mysql* ynh_replace_string --match_string="# fr_FR.UTF-8 UTF-8" --replace_string="fr_FR.UTF-8 UTF-8" --target_file=/etc/locale.gen From 579a451c414ab7c88cb5b0d9befeabb7f09c7b14 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 9 Dec 2020 13:55:01 +0100 Subject: [PATCH 12/28] ynh_install_app_dependencies $pkg_dependencies --- scripts/restore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index 7a6bb3e..1fb9ff3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -56,8 +56,7 @@ install_zabbix_repo ynh_print_info "Update and install dependencies" ynh_package_update -ynh_install_app_dependencies libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php7.3 php7.3-bcmath ttf-dejavu-core php7.3-bcmath patch smistrip unzip wget fping libcap2-bin libiksemel3 libopenipmi0 libpam-cap libsnmp-base libsnmp30 snmptrapd snmpd libjs-prototype jq zabbix-server-mysql zabbix-agent zabbix-frontend-php - +ynh_install_app_dependencies $pkg_dependencies DEBIAN_FRONTEND=noninteractive apt-mark hold zabbix-server-mysql zabbix-frontend-php ynh_replace_string --match_string="# fr_FR.UTF-8 UTF-8" --replace_string="fr_FR.UTF-8 UTF-8" --target_file=/etc/locale.gen From 0c5873183916d40c166bca256af3232c417a0325 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 9 Dec 2020 13:55:13 +0100 Subject: [PATCH 13/28] ynh_install_app_dependencies $pkg_dependencies --- scripts/upgrade | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 369df3f..a6351f3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -145,8 +145,7 @@ then ynh_package_remove zabbix-server-mysql zabbix-frontend-php ynh_print_info "Update zabbix via apt package" - ynh_install_app_dependencies libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.2-0 php7.3 php7.3-bcmath ttf-dejavu-core php7.3-bcmath patch smistrip unzip wget fping libcap2-bin libiksemel3 libopenipmi0 libpam-cap libsnmp-base libsnmp30 snmptrapd snmpd libjs-prototype jq zabbix-server-mysql zabbix-agent zabbix-frontend-php - + ynh_install_app_dependencies $pkg_dependencies ynh_secure_remove /usr/share/zabbix/conf/zabbix.conf.php cp -rpf /tmp/zabbix /etc/ cp -pf /tmp/zabbix.conf.php /usr/share/zabbix/conf/ From f179293442e8c4f830924d8446e252f51abf016d Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Fri, 11 Dec 2020 13:30:45 +0100 Subject: [PATCH 14/28] Update php-fpm.conf to php7.3 --- conf/php-fpm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/php-fpm.conf b/conf/php-fpm.conf index 1d45298..28fdf93 100644 --- a/conf/php-fpm.conf +++ b/conf/php-fpm.conf @@ -1,7 +1,7 @@ [__NAMETOCHANGE__] user = www-data group = www-data -listen = /var/run/php/php7.0-fpm-__NAMETOCHANGE__.sock +listen = /var/run/php/php7.3-fpm-__NAMETOCHANGE__.sock listen.owner = www-data listen.group = www-data pm = dynamic From 1191b4041fe5094a7b127b3a4a43f0dc082eb402 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Fri, 11 Dec 2020 13:37:52 +0100 Subject: [PATCH 15/28] test if /var/cache/apt/archives/zabbix-server-mysql* exists --- scripts/install | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 9c120c1..dc50a14 100644 --- a/scripts/install +++ b/scripts/install @@ -94,7 +94,9 @@ ynh_app_setting_set "$app" language "$language" ### - And the section "UPGRADE DEPENDENCIES" in the upgrade script ynh_script_progression --message="Remove Zabbix if already installed" -w 1 apt-get purge zabbix* -y -ynh_secure_remove /var/cache/apt/archives/zabbix-server-mysql* +if compgen -G "/var/cache/apt/archives/zabbix-server-mysql*" > /dev/null; then + ynh_secure_remove /var/cache/apt/archives/zabbix-server-mysql* +fi ynh_script_progression --message="Install Zabbix repository" -w 3 install_zabbix_repo From 3c90ddbbff3c76f01f5b14d0760d6a27d9aa19fb Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Fri, 11 Dec 2020 13:59:31 +0100 Subject: [PATCH 16/28] debug Warning: - E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) Warning: - E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it? --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index dc50a14..7758120 100644 --- a/scripts/install +++ b/scripts/install @@ -93,6 +93,7 @@ ynh_app_setting_set "$app" language "$language" ### - As well as the section "REINSTALL DEPENDENCIES" in the restore script ### - And the section "UPGRADE DEPENDENCIES" in the upgrade script ynh_script_progression --message="Remove Zabbix if already installed" -w 1 +ps -p "$(lsof /var/lib/dpkg/lock-frontend | tail -1 | awk '{print $2}')" apt-get purge zabbix* -y if compgen -G "/var/cache/apt/archives/zabbix-server-mysql*" > /dev/null; then ynh_secure_remove /var/cache/apt/archives/zabbix-server-mysql* From 8ebe059f9808172e1c1eea78e2830d9d138de417 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Fri, 11 Dec 2020 14:06:43 +0100 Subject: [PATCH 17/28] Update install --- scripts/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 7758120..c47668c 100644 --- a/scripts/install +++ b/scripts/install @@ -93,7 +93,8 @@ ynh_app_setting_set "$app" language "$language" ### - As well as the section "REINSTALL DEPENDENCIES" in the restore script ### - And the section "UPGRADE DEPENDENCIES" in the upgrade script ynh_script_progression --message="Remove Zabbix if already installed" -w 1 -ps -p "$(lsof /var/lib/dpkg/lock-frontend | tail -1 | awk '{print $2}')" +lsof /var/lib/dpkg/lock-frontend | tail -1 | awk '{print $2}' +ps aux apt-get purge zabbix* -y if compgen -G "/var/cache/apt/archives/zabbix-server-mysql*" > /dev/null; then ynh_secure_remove /var/cache/apt/archives/zabbix-server-mysql* From e070975e620557dc6554b2bb0d00d191d68fe468 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Fri, 11 Dec 2020 19:01:37 +0100 Subject: [PATCH 18/28] check if unattended-upgrade active --- scripts/install | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index c47668c..1bbfee9 100644 --- a/scripts/install +++ b/scripts/install @@ -92,9 +92,14 @@ ynh_app_setting_set "$app" language "$language" ### - Remove the section "REMOVE DEPENDENCIES" in the remove script ### - As well as the section "REINSTALL DEPENDENCIES" in the restore script ### - And the section "UPGRADE DEPENDENCIES" in the upgrade script + +pid=$(pgrep -f '/usr/bin/python3 /usr/bin/unattended-upgrade --download-only') +if [ ! -z $pid ] ;then + ynh_script_progression --message="Check and wait end of unattended-upgrade of package_check" -w 1 + tail --pid=$pid -f /dev/null +fi + ynh_script_progression --message="Remove Zabbix if already installed" -w 1 -lsof /var/lib/dpkg/lock-frontend | tail -1 | awk '{print $2}' -ps aux apt-get purge zabbix* -y if compgen -G "/var/cache/apt/archives/zabbix-server-mysql*" > /dev/null; then ynh_secure_remove /var/cache/apt/archives/zabbix-server-mysql* From e66bfd6340873cbb23618a37ce7eee5ce4e5c37a Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Fri, 11 Dec 2020 19:05:57 +0100 Subject: [PATCH 19/28] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 1bbfee9..c284506 100644 --- a/scripts/install +++ b/scripts/install @@ -94,7 +94,7 @@ ynh_app_setting_set "$app" language "$language" ### - And the section "UPGRADE DEPENDENCIES" in the upgrade script pid=$(pgrep -f '/usr/bin/python3 /usr/bin/unattended-upgrade --download-only') -if [ ! -z $pid ] ;then +if [ ! -z "$pid" ] ;then ynh_script_progression --message="Check and wait end of unattended-upgrade of package_check" -w 1 tail --pid=$pid -f /dev/null fi From dd213ff00bfd8ab64f92e0b2979d489e378232c4 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 17 Dec 2020 12:57:50 +0100 Subject: [PATCH 20/28] try pid=$(pgrep -f '/usr/bin/python3 /usr/bin/unattended-upgrade --download-only' || true) to avoid exit 1 pgrep --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index c284506..1f924ac 100644 --- a/scripts/install +++ b/scripts/install @@ -93,7 +93,7 @@ ynh_app_setting_set "$app" language "$language" ### - As well as the section "REINSTALL DEPENDENCIES" in the restore script ### - And the section "UPGRADE DEPENDENCIES" in the upgrade script -pid=$(pgrep -f '/usr/bin/python3 /usr/bin/unattended-upgrade --download-only') +pid=$(pgrep -f '/usr/bin/python3 /usr/bin/unattended-upgrade --download-only' || true) if [ ! -z "$pid" ] ;then ynh_script_progression --message="Check and wait end of unattended-upgrade of package_check" -w 1 tail --pid=$pid -f /dev/null From 7cb8487652f7e052c453dfb25286a8989c56b385 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 17 Dec 2020 14:03:16 +0100 Subject: [PATCH 21/28] remove level=5 auto like this : https://github.com/YunoHost/example_ynh/commit/a01520f5097c9b1f4de7c1ff457aa96fa34b951b --- check_process | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/check_process b/check_process index 4b39161..5b437be 100644 --- a/check_process +++ b/check_process @@ -26,8 +26,7 @@ port_already_use=1 change_url=1 ;;; Levels -# https://framagit.org/Mickael-Martin/zabbix_ynh/blob/master/scripts/install#L141 - Level 5=auto +# https://framagit.org/Mickael-Martin/zabbix_ynh/blob/master/scripts/install#L156 ;;; Options Email= Notification=none From eac5ddf585884f86195fd1bcaae4b7e9f8224465 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 17 Dec 2020 16:44:51 +0100 Subject: [PATCH 22/28] check to level 8 --- check_process | 1 + 1 file changed, 1 insertion(+) diff --git a/check_process b/check_process index 5b437be..6589238 100644 --- a/check_process +++ b/check_process @@ -27,6 +27,7 @@ change_url=1 ;;; Levels # https://framagit.org/Mickael-Martin/zabbix_ynh/blob/master/scripts/install#L156 + Level 8=auto ;;; Options Email= Notification=none From 09fc6c4ac1259bf8983b57bc747ace53c73faf53 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Tue, 22 Dec 2020 13:41:16 +0100 Subject: [PATCH 23/28] update to php 7.4 --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 47ce140..32dd1cb 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -18,7 +18,7 @@ location __PATH__/ { try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock; + fastcgi_pass unix:/var/run/php/php7.4-fpm-__NAME__.sock; fastcgi_index index.php; include fastcgi_params; From f255469a22e781bbe97ac0d23de783f6e4802794 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Tue, 22 Dec 2020 13:41:37 +0100 Subject: [PATCH 24/28] Update to php7.3 --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 32dd1cb..6074650 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -18,7 +18,7 @@ location __PATH__/ { try_files $uri $uri/ index.php; location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php/php7.4-fpm-__NAME__.sock; + fastcgi_pass unix:/var/run/php/php7.3-fpm-__NAME__.sock; fastcgi_index index.php; include fastcgi_params; From a548c24d93cab04b88cc5203e11c91a56d6a80fa Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Tue, 22 Dec 2020 13:50:46 +0100 Subject: [PATCH 25/28] change to new "rights" (private) disable unprotected_uris --- scripts/install | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/scripts/install b/scripts/install index 1f924ac..00ebbae 100644 --- a/scripts/install +++ b/scripts/install @@ -267,12 +267,6 @@ ynh_add_fpm_config ### so we're going to use curl to automatically fill the fields and submit the ### forms. -# Set right permissions for curl install -#chown -R www-data: $final_path - -# Set the app as temporarily public for curl call -#ynh_app_setting_set $app skipped_uris "/" - # Reload SSOwat config yunohost app ssowatconf @@ -370,7 +364,7 @@ yunohost service add zabbix-agent -d "Management Zabbix agent daemon : send info # Make app public if for importing template # unprotected_uris allows SSO credentials to be passed anyway -ynh_app_setting_set "$app" unprotected_uris "/" +#ynh_app_setting_set "$app" unprotected_uris "/" #================================================= # RELOAD NGINX AND PHP-FPM @@ -403,12 +397,14 @@ disable_admin_user # SETUP SSOWAT #================================================= -# Make app private if necessary -if [ "$is_public" -eq 0 ] +# Make app public if necessary +if [ $is_public -eq 1 ] then - # unprotected_uris allows SSO credentials to be passed anyway. - ynh_app_setting_delete "$app" unprotected_uris + # 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 AND PHP-FPM #================================================= From 5ca0e91add9cb951fc0993f01e6176ade5b8e4e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 5 Jan 2021 23:51:50 +0100 Subject: [PATCH 26/28] Set badge to SVG --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ee4f8e..c55d500 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Zabbix for YunoHost [![Integration level](https://dash.yunohost.org/integration/zabbix.svg)](https://dash.yunohost.org/appci/app/zabbix) ![](https://ci-apps.yunohost.org/ci/badges/zabbix.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/zabbix.maintain.svg) -[![Install zabbix with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=zabbix) +[![Install zabbix with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=zabbix) > *This package allow you to install Zabbix quickly and simply on a YunoHost server. If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* From 94b238e09cc178740b4e8db34a0198d9e587ab1e Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Mon, 15 Mar 2021 00:23:09 +0100 Subject: [PATCH 27/28] [autopatch] Missing ynh_abort_if_errors in change_url scripts --- scripts/change_url | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/change_url b/scripts/change_url index f71fc77..e727aa9 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -8,6 +8,7 @@ source _common.sh source /usr/share/yunohost/helpers +ynh_abort_if_errors #================================================= # RETRIEVE ARGUMENTS From 3732833c17d45545326459aaa5f8f0df66895247 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Thu, 13 May 2021 17:54:26 +0200 Subject: [PATCH 28/28] [autopatch] Update issue and PR templates --- .github/ISSUE_TEMPLATE.md | 55 ++++++++++++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 16 ++++++++++ 2 files changed, 71 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..2729a6b --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,55 @@ +--- +name: Bug report +about: When creating a bug report, please use the following template to provide all the relevant information and help debugging efficiently. + +--- + +**How to post a meaningful bug report** +1. *Read this whole template first.* +2. *Determine if you are on the right place:* + - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* + - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* + - *When in doubt, post here and we will figure it out together.* +3. *Delete the italic comments as you write over them below, and remove this guide.* +--- + +### Describe the bug + +*A clear and concise description of what the bug is.* + +### Context + +- Hardware: *VPS bought online / Old laptop or computer / Raspberry Pi at home / Internet Cube with VPN / Other ARM board / ...* +- YunoHost version: x.x.x +- I have access to my server: *Through SSH | through the webadmin | direct access via keyboard / screen | ...* +- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no / yes* + - If yes, please explain: +- Using, or trying to install package version/branch: +- If upgrading, current package version: *can be found in the admin, or with `yunohost app info $app_id`* + +### Steps to reproduce + +- *If you performed a command from the CLI, the command itself is enough. For example:* + ```sh + sudo yunohost app install the_app + ``` +- *If you used the webadmin, please perform the equivalent command from the CLI first.* +- *If the error occurs in your browser, explain what you did:* + 1. *Go to '...'* + 2. *Click on '...'* + 3. *Scroll down to '...'* + 4. *See error* + +### Expected behavior + +*A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.* + +### Logs + +*When an operation fails, YunoHost provides a simple way to share the logs.* +- *In the webadmin, the error message contains a link to the relevant log page. On that page, you will be able to 'Share with Yunopaste'. If you missed it, the logs of previous operations are also available under Tools > Logs.* +- *In command line, the command to share the logs is displayed at the end of the operation and looks like `yunohost log display [log name] --share`. If you missed it, you can find the log ID of a previous operation using `yunohost log list`.* + +*After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)* + +*If applicable and useful, add screenshots to help explain your problem.* diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ef70e18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Problem + +- *Description of why you made this PR* + +## Solution + +- *And how do you fix that problem* + +## PR Status + +- [ ] Code finished and ready to be reviewed/tested +- [ ] The fix/enhancement were manually tested (if applicable) + +## Automatic tests + +Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)