From fde6c94213d1c136c84da634898d41c8321a74dd Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 12 Sep 2019 13:44:12 +0200 Subject: [PATCH 01/30] Update to 4.2.6-1 zabbix version --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 3535742..0bba0f4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -14,7 +14,7 @@ source /usr/share/yunohost/helpers #================================================= app=$YNH_APP_INSTANCE_NAME -trustedversion="1:4.2.4-1+stretch" +trustedversion="1:4.2.6-1+stretch" export domain=$(ynh_app_setting_get "$app" domain) export path_url=$(ynh_app_setting_get "$app" path) #admin=$(ynh_app_setting_get "$app" admin) #not used From 796049de8680c7ac051d5fa90f0233b1abecc4d6 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Tue, 24 Sep 2019 19:46:31 +0200 Subject: [PATCH 02/30] Update upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 0bba0f4..203fe9a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -139,7 +139,7 @@ zabbixagentCandidateVersion=$(apt-cache policy zabbix-agent | sed -n '3p' | grep if [ "$trustedversion" == "$zabbixServerCandidateVersion" ] then - if [ "$zabbixServerInstalledVersion" != "$zabbixServerCandidateVersion" ] || [ "$zabbixFrontendInstalledVersion" != "$zabbixFrontendCandidateVersion" ] || [ "$zabbixagentInstalledVersion" != "$zabbixagentCandidateVersion" ] + if [[ "$zabbixServerInstalledVersion" < "$zabbixServerCandidateVersion" ]] || [[ "$zabbixFrontendInstalledVersion" < "$zabbixFrontendCandidateVersion" ]] || [[ "$zabbixagentInstalledVersion" < "$zabbixagentCandidateVersion" ]] then #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP From fdf3fd585972780f1fbf9967814e6033fc18ad2b Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 25 Sep 2019 13:37:20 +0200 Subject: [PATCH 03/30] Update install --- scripts/install | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/install b/scripts/install index 556c1f3..6c567f1 100644 --- a/scripts/install +++ b/scripts/install @@ -106,7 +106,6 @@ ynh_print_info "Update and install dependencies" #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 dpkg -i --force-confmiss /var/cache/apt/archives/zabbix-server-mysql* -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 locale-gen From 75a87e8b024b16a057bd9422c590752096e52829 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 25 Sep 2019 13:56:28 +0200 Subject: [PATCH 04/30] Update _common.sh --- scripts/_common.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index fcfa442..a816398 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -171,5 +171,6 @@ check_proc_zabbixagent(){ install_zabbix_repo(){ ynh_add_extra_apt_repos__3_path=$(find /var/cache/yunohost/ /etc/yunohost/apps/zabbix/ -name "ynh_add_extra_apt_repos__3" | tail -n 1) source "$ynh_add_extra_apt_repos__3_path" - ynh_install_extra_repo --repo="http://repo.zabbix.com/zabbix/4.2/debian $(lsb_release -sc) main" --key=https://repo.zabbix.com/zabbix-official-repo.key --priority=999 --name=zabbix + ynh_install_extra_repo --repo="http://repo.zabbix.com/zabbix/4.2/debian $(lsb_release -sc) main" --key=https://repo.zabbix.com/zabbix-official-repo.key --priority=999 --name=zabbix + ynh_package_install zabbix-release } \ No newline at end of file From 99ebe1a393a0441fd8e002b15539e5858dcbf833 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 25 Sep 2019 14:00:29 +0200 Subject: [PATCH 05/30] remove version agent/ only version of release --- scripts/upgrade | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 203fe9a..7ac09c2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -14,7 +14,7 @@ source /usr/share/yunohost/helpers #================================================= app=$YNH_APP_INSTANCE_NAME -trustedversion="1:4.2.6-1+stretch" +trustedversion="4.2-2+stretch" export domain=$(ynh_app_setting_get "$app" domain) export path_url=$(ynh_app_setting_get "$app" path) #admin=$(ynh_app_setting_get "$app" admin) #not used @@ -127,20 +127,10 @@ ynh_remove_logrotate ynh_print_info "Check if new zabbix version is available on repo" ynh_package_update -zabbixServerInstalledVersion=$(apt-cache policy zabbix-server-mysql | sed -n '2p' | grep -Po ".*: \K(.*)") -zabbixServerCandidateVersion=$(apt-cache policy zabbix-server-mysql | sed -n '3p' | grep -Po ".*: \K(.*)") +zabbixReleaseInstalledVersion=$(apt-cache policy zabbix-release | sed -n '2p' | grep -Po ".* \K(.*)") -zabbixFrontendInstalledVersion=$(apt-cache policy zabbix-frontend-php | sed -n '2p' | grep -Po ".*: \K(.*)") -zabbixFrontendCandidateVersion=$(apt-cache policy zabbix-frontend-php | sed -n '3p' | grep -Po ".*: \K(.*)") - -zabbixagentInstalledVersion=$(apt-cache policy zabbix-agent | sed -n '2p' | grep -Po ".*: \K(.*)") -zabbixagentCandidateVersion=$(apt-cache policy zabbix-agent | sed -n '3p' | grep -Po ".*: \K(.*)") - -if [ "$trustedversion" == "$zabbixServerCandidateVersion" ] +if [[ "$trustedversion" > "zabbixReleaseInstalledVersion" ]] then - - if [[ "$zabbixServerInstalledVersion" < "$zabbixServerCandidateVersion" ]] || [[ "$zabbixFrontendInstalledVersion" < "$zabbixFrontendCandidateVersion" ]] || [[ "$zabbixagentInstalledVersion" < "$zabbixagentCandidateVersion" ]] - then #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -182,11 +172,8 @@ then #test if zabbix agent is started check_proc_zabbixserver - else - ynh_print_info "No update from repo ! (Already up to date)" - fi else - ynh_print_info "No update from repo ! (Trusted version)" + ynh_print_info "No repo update ! (Trusted version)" fi #================================================= From c2f024e8fa837095d76485290a94b7ca74d79c7b Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 25 Sep 2019 14:01:25 +0200 Subject: [PATCH 06/30] remove hold version --- scripts/upgrade | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 7ac09c2..c108691 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -152,7 +152,6 @@ then 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 - DEBIAN_FRONTEND=noninteractive apt-mark hold zabbix-server-mysql zabbix-frontend-php rm /usr/share/zabbix/conf/zabbix.conf.php From fcc2274a61a718698ae707c0dd0f3f8d12754de1 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 25 Sep 2019 14:04:25 +0200 Subject: [PATCH 07/30] Update nginx.conf --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 20e75b5..10ca335 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -29,5 +29,5 @@ location __PATH__/ { ### End of PHP configuration part # Include SSOWAT user panel. - #include conf.d/yunohost_panel.conf.inc; + include conf.d/yunohost_panel.conf.inc; } From e83b39a4c237fcf28b5a28b77680a8be92b99b37 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Wed, 25 Sep 2019 14:06:18 +0200 Subject: [PATCH 08/30] add ynh_add_nginx_config to update it --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index c108691..9152af4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -188,5 +188,6 @@ else ynh_app_setting_set "$app" unprotected_uris "/" fi +ynh_add_nginx_config systemctl reload nginx yunohost app ssowatconf From e51398c5bc3745111369cd21b5a48f4f820788fa Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 10 Oct 2019 13:03:01 +0200 Subject: [PATCH 09/30] Update _common.sh to 4.4.0 --- scripts/_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index a816398..50263d8 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -171,6 +171,6 @@ check_proc_zabbixagent(){ install_zabbix_repo(){ ynh_add_extra_apt_repos__3_path=$(find /var/cache/yunohost/ /etc/yunohost/apps/zabbix/ -name "ynh_add_extra_apt_repos__3" | tail -n 1) source "$ynh_add_extra_apt_repos__3_path" - ynh_install_extra_repo --repo="http://repo.zabbix.com/zabbix/4.2/debian $(lsb_release -sc) main" --key=https://repo.zabbix.com/zabbix-official-repo.key --priority=999 --name=zabbix + ynh_install_extra_repo --repo="http://repo.zabbix.com/zabbix/4.4/debian $(lsb_release -sc) main" --key=https://repo.zabbix.com/zabbix-official-repo.key --priority=999 --name=zabbix ynh_package_install zabbix-release } \ No newline at end of file From ca9d14c066f42884c1d5aba315d7fff860969301 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 10 Oct 2019 13:04:36 +0200 Subject: [PATCH 10/30] Update to 4.4-1+stretch --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 9152af4..ab939e0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -14,7 +14,7 @@ source /usr/share/yunohost/helpers #================================================= app=$YNH_APP_INSTANCE_NAME -trustedversion="4.2-2+stretch" +trustedversion="4.4-1+stretch" export domain=$(ynh_app_setting_get "$app" domain) export path_url=$(ynh_app_setting_get "$app" path) #admin=$(ynh_app_setting_get "$app" admin) #not used From 31c7a6c24a71fa72e4bf48ce9818e339b0ec19a5 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 10 Oct 2019 13:05:45 +0200 Subject: [PATCH 11/30] missing var --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index ab939e0..99881a0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -129,7 +129,7 @@ ynh_package_update zabbixReleaseInstalledVersion=$(apt-cache policy zabbix-release | sed -n '2p' | grep -Po ".* \K(.*)") -if [[ "$trustedversion" > "zabbixReleaseInstalledVersion" ]] +if [[ "$trustedversion" > "$zabbixReleaseInstalledVersion" ]] then #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP From 02a941bc447731e63a4a84005e9a62b455292bc6 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 10 Oct 2019 13:19:38 +0200 Subject: [PATCH 12/30] Update to fix installed version --- scripts/upgrade | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 99881a0..f0a6824 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -15,6 +15,7 @@ source /usr/share/yunohost/helpers app=$YNH_APP_INSTANCE_NAME trustedversion="4.4-1+stretch" +forceupdate=0 export domain=$(ynh_app_setting_get "$app" domain) export path_url=$(ynh_app_setting_get "$app" path) #admin=$(ynh_app_setting_get "$app" admin) #not used @@ -118,6 +119,12 @@ if [ "$(dpkg -l zabbix-release 2>/dev/null | wc -l)" -ne 0 ];then install_zabbix_repo fi +#patch if zabbix-release has Candidate version but no Installed version +if [ "$(apt-cache policy zabbix-release | sed -n '2p' | grep -Po ".* \K(.*)" | grep -e '(.*)' -c)" -eq 1 ];then + install_zabbix_repo + forceupdate=1 +fi + #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -129,7 +136,7 @@ ynh_package_update zabbixReleaseInstalledVersion=$(apt-cache policy zabbix-release | sed -n '2p' | grep -Po ".* \K(.*)") -if [[ "$trustedversion" > "$zabbixReleaseInstalledVersion" ]] +if [[ "$trustedversion" > "$zabbixReleaseInstalledVersion" ]] || [[ "$forceupdate" == "1" ]] then #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP From 72454a47d41e30ebb8701776a8111e03da6ccac8 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 10 Oct 2019 13:32:53 +0200 Subject: [PATCH 13/30] remove install release --- scripts/_common.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 50263d8..37c9763 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -172,5 +172,4 @@ install_zabbix_repo(){ ynh_add_extra_apt_repos__3_path=$(find /var/cache/yunohost/ /etc/yunohost/apps/zabbix/ -name "ynh_add_extra_apt_repos__3" | tail -n 1) source "$ynh_add_extra_apt_repos__3_path" ynh_install_extra_repo --repo="http://repo.zabbix.com/zabbix/4.4/debian $(lsb_release -sc) main" --key=https://repo.zabbix.com/zabbix-official-repo.key --priority=999 --name=zabbix - ynh_package_install zabbix-release } \ No newline at end of file From 3e0608c7b0dcec6f04624aee59eb9acf6d0577d1 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 10 Oct 2019 13:35:45 +0200 Subject: [PATCH 14/30] Update with installing official repo (pinning used) --- scripts/upgrade | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index f0a6824..79f62ea 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -120,9 +120,11 @@ if [ "$(dpkg -l zabbix-release 2>/dev/null | wc -l)" -ne 0 ];then fi #patch if zabbix-release has Candidate version but no Installed version -if [ "$(apt-cache policy zabbix-release | sed -n '2p' | grep -Po ".* \K(.*)" | grep -e '(.*)' -c)" -eq 1 ];then - install_zabbix_repo - forceupdate=1 +if [ -f "/etc/apt/sources.list.d/zabbix.list" ];then + if [ "$(grep -c "4.2" /etc/apt/sources.list.d/zabbix.list)" -eq 1 ];then + install_zabbix_repo + forceupdate=1 + fi fi #================================================= From 32e28d7cfed07c9370e151ea72a85602375e7a94 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 10 Oct 2019 18:40:34 +0200 Subject: [PATCH 15/30] read only for conf file --- scripts/install | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install b/scripts/install index 6c567f1..c1a168d 100644 --- a/scripts/install +++ b/scripts/install @@ -281,6 +281,7 @@ ynh_replace_string --match_string="db_name" --replace_string="$db_name" --target ynh_replace_string --match_string="db_user" --replace_string="$db_user" --target_file=/usr/share/zabbix/conf/zabbix.conf.php ynh_replace_string --match_string="db_pwd" --replace_string="$db_pwd" --target_file=/usr/share/zabbix/conf/zabbix.conf.php +chattr +i /usr/share/zabbix/conf/zabbix.conf.php chown -R www-data. /usr/share/zabbix ynh_replace_string --match_string="DBName=zabbix" --replace_string="DBName=$db_name" --target_file=/etc/zabbix/zabbix_server.conf From 562d46756ce13bde1e3f61b33c0027a507bc09f5 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Mon, 4 Nov 2019 14:01:17 +0100 Subject: [PATCH 16/30] ynh_package_install --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 79f62ea..8ab80ef 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -158,9 +158,9 @@ then DEBIAN_FRONTEND=noninteractive apt-mark unhold zabbix-server-mysql zabbix-frontend-php - ynh_print_info "Update and install dependencies" + ynh_print_info "Update zabbix via apt package" 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_package_install zabbix-server-mysql zabbix-agent zabbix-frontend-php rm /usr/share/zabbix/conf/zabbix.conf.php From 13450fb9db427d449220edc8ef5421528df13f04 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Mon, 4 Nov 2019 14:09:37 +0100 Subject: [PATCH 17/30] restart services --- scripts/upgrade | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 8ab80ef..794191a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -153,6 +153,9 @@ then # Exit if an error occurs during the execution of the script ynh_abort_if_errors + yunohost service stop zabbix-server + yunohost service stop zabbix-agent + cp -rp /etc/zabbix /tmp/ cp -p /usr/share/zabbix/conf/zabbix.conf.php /tmp/ @@ -174,6 +177,9 @@ then yunohost service add zabbix-server -d "Management Zabbix server daemon : Collect, agregate, compute and notify" yunohost service add zabbix-agent -d "Management Zabbix agent daemon : send informations about this host to the server" + yunohost service start zabbix-server + yunohost service start zabbix-agent + #test if zabbix server is started check_proc_zabbixagent From c07324c30c341300ddf6d56589c266922532534b Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Mon, 4 Nov 2019 18:56:36 +0100 Subject: [PATCH 18/30] delete chattr --- scripts/install | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/install b/scripts/install index c1a168d..6c567f1 100644 --- a/scripts/install +++ b/scripts/install @@ -281,7 +281,6 @@ ynh_replace_string --match_string="db_name" --replace_string="$db_name" --target ynh_replace_string --match_string="db_user" --replace_string="$db_user" --target_file=/usr/share/zabbix/conf/zabbix.conf.php ynh_replace_string --match_string="db_pwd" --replace_string="$db_pwd" --target_file=/usr/share/zabbix/conf/zabbix.conf.php -chattr +i /usr/share/zabbix/conf/zabbix.conf.php chown -R www-data. /usr/share/zabbix ynh_replace_string --match_string="DBName=zabbix" --replace_string="DBName=$db_name" --target_file=/etc/zabbix/zabbix_server.conf From 1d0bb0c99d02d085a56aa0a8b54b452f6b02c904 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 14 Nov 2019 13:50:18 +0100 Subject: [PATCH 19/30] change package install to package install dependencies --- scripts/upgrade | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 794191a..9ee5414 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -148,7 +148,7 @@ then ynh_backup_before_upgrade ynh_clean_setup () { # restore it if the upgrade fails - ynh_restore_upgradebackup + ynh_restore_upgradebackup } # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -163,8 +163,7 @@ then ynh_print_info "Update zabbix via apt package" ynh_package_update - ynh_package_install zabbix-server-mysql zabbix-agent zabbix-frontend-php - + 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 rm /usr/share/zabbix/conf/zabbix.conf.php cp -rpf /tmp/zabbix /etc/ From d5ed875b99e310d4aa4a0e6dacf067c450fe107b Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 14 Nov 2019 13:58:32 +0100 Subject: [PATCH 20/30] delete ynh_package_update duplicate --- scripts/upgrade | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 9ee5414..12bb0ca 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -162,7 +162,6 @@ then DEBIAN_FRONTEND=noninteractive apt-mark unhold zabbix-server-mysql zabbix-frontend-php ynh_print_info "Update zabbix via apt package" - 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 rm /usr/share/zabbix/conf/zabbix.conf.php From b7a7d9ea2cf5dbd5f7c1639c5cce3feb7457946d Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Mon, 18 Nov 2019 13:18:02 +0100 Subject: [PATCH 21/30] remove and install (instead upgrade) --- scripts/upgrade | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/upgrade b/scripts/upgrade index 12bb0ca..cf083b5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -160,6 +160,7 @@ then cp -p /usr/share/zabbix/conf/zabbix.conf.php /tmp/ DEBIAN_FRONTEND=noninteractive apt-mark unhold zabbix-server-mysql zabbix-frontend-php + 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.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 From 772ffee85e63a05780d5d566d6f497707f1c7543 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Mon, 18 Nov 2019 13:29:38 +0100 Subject: [PATCH 22/30] ynh_remove_app_dependencies instead ynh_package_remove --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index cf083b5..c42c802 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -160,7 +160,7 @@ then cp -p /usr/share/zabbix/conf/zabbix.conf.php /tmp/ DEBIAN_FRONTEND=noninteractive apt-mark unhold zabbix-server-mysql zabbix-frontend-php - ynh_package_remove zabbix-server-mysql zabbix-frontend-php + ynh_remove_app_dependencies 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.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 From fd2861438b8a022461be62e58ac04fe5abc191fd Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Mon, 18 Nov 2019 13:30:49 +0100 Subject: [PATCH 23/30] disable ssowat reload (test) --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index c42c802..bfa6bd6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -59,7 +59,7 @@ export mysqlconn="mysql -u$db_user -p$db_pwd $db_name" ynh_print_info "disable SSOWAT temporaly" ynh_app_setting_set "$app" unprotected_uris "/" systemctl reload nginx -yunohost app ssowatconf +#yunohost app ssowatconf #================================================= # Enable default admin temporaly @@ -204,4 +204,4 @@ fi ynh_add_nginx_config systemctl reload nginx -yunohost app ssowatconf +#yunohost app ssowatconf From 329d3ab41195d5fb5123e3a7f92da4d0d9c6dc5c Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Mon, 18 Nov 2019 13:31:52 +0100 Subject: [PATCH 24/30] disable ssowat reload (test) --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 6c567f1..3a4a35f 100644 --- a/scripts/install +++ b/scripts/install @@ -260,7 +260,7 @@ ynh_add_fpm_config #ynh_app_setting_set $app skipped_uris "/" # Reload SSOwat config -yunohost app ssowatconf +#yunohost app ssowatconf # Reload Nginx systemctl reload nginx @@ -360,7 +360,7 @@ systemctl reload nginx systemctl reload php7.0-fpm # Reload SSOwat config -yunohost app ssowatconf +#yunohost app ssowatconf #================================================= # Import Yunohost template @@ -395,7 +395,7 @@ systemctl reload nginx systemctl reload php7.0-fpm # Reload SSOwat config -yunohost app ssowatconf +#yunohost app ssowatconf #test if zabbix server is started check_proc_zabbixagent From a672a3d5d7ed79fbbdc57d784c6b93d3bcd3bcbd Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Mon, 18 Nov 2019 13:32:24 +0100 Subject: [PATCH 25/30] disable ssowat reload (test) --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index d72d507..7ad8614 100644 --- a/scripts/restore +++ b/scripts/restore @@ -153,7 +153,7 @@ systemctl reload nginx systemctl reload php7.0-fpm # Reload SSOwat config -yunohost app ssowatconf +#yunohost app ssowatconf #test if zabbix server is started check_proc_zabbixagent From 39608766fafd73100a35a33f35b0651b1823a7cc Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Mon, 18 Nov 2019 13:38:05 +0100 Subject: [PATCH 26/30] Revert "ynh_remove_app_dependencies instead ynh_package_remove" This reverts commit 772ffee85e63a05780d5d566d6f497707f1c7543 --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index bfa6bd6..c087654 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -160,7 +160,7 @@ then cp -p /usr/share/zabbix/conf/zabbix.conf.php /tmp/ DEBIAN_FRONTEND=noninteractive apt-mark unhold zabbix-server-mysql zabbix-frontend-php - ynh_remove_app_dependencies zabbix-server-mysql zabbix-frontend-php + 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.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 From 43a0dc5e0d39c57642da5e7d86542b995f36e64c Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Mon, 18 Nov 2019 13:45:42 +0100 Subject: [PATCH 27/30] remove php7.0 dependencies --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index c087654..d3eccb9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -163,7 +163,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.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 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 rm /usr/share/zabbix/conf/zabbix.conf.php cp -rpf /tmp/zabbix /etc/ From 1fc96eb926b244cc38be1ae1e5037bc35a2ffbad Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Mon, 18 Nov 2019 13:50:56 +0100 Subject: [PATCH 28/30] re-enable ssowat (requiere for import template) --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index d3eccb9..33a2869 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -59,7 +59,7 @@ export mysqlconn="mysql -u$db_user -p$db_pwd $db_name" ynh_print_info "disable SSOWAT temporaly" ynh_app_setting_set "$app" unprotected_uris "/" systemctl reload nginx -#yunohost app ssowatconf +yunohost app ssowatconf #================================================= # Enable default admin temporaly @@ -204,4 +204,4 @@ fi ynh_add_nginx_config systemctl reload nginx -#yunohost app ssowatconf +yunohost app ssowatconf From 74d7dff586f05ad5f61ed404c6e051042ee1c4fc Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Mon, 18 Nov 2019 13:52:11 +0100 Subject: [PATCH 29/30] re-enable ssowat (to import template) --- scripts/install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 3a4a35f..6c567f1 100644 --- a/scripts/install +++ b/scripts/install @@ -260,7 +260,7 @@ ynh_add_fpm_config #ynh_app_setting_set $app skipped_uris "/" # Reload SSOwat config -#yunohost app ssowatconf +yunohost app ssowatconf # Reload Nginx systemctl reload nginx @@ -360,7 +360,7 @@ systemctl reload nginx systemctl reload php7.0-fpm # Reload SSOwat config -#yunohost app ssowatconf +yunohost app ssowatconf #================================================= # Import Yunohost template @@ -395,7 +395,7 @@ systemctl reload nginx systemctl reload php7.0-fpm # Reload SSOwat config -#yunohost app ssowatconf +yunohost app ssowatconf #test if zabbix server is started check_proc_zabbixagent From 9b6e271f425755a79ad9d015c6a7dc9f77ae273c Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Mon, 18 Nov 2019 13:52:59 +0100 Subject: [PATCH 30/30] ssowatconf re-enable --- scripts/restore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/restore b/scripts/restore index 7ad8614..d72d507 100644 --- a/scripts/restore +++ b/scripts/restore @@ -153,7 +153,7 @@ systemctl reload nginx systemctl reload php7.0-fpm # Reload SSOwat config -#yunohost app ssowatconf +yunohost app ssowatconf #test if zabbix server is started check_proc_zabbixagent