From 3e0608c7b0dcec6f04624aee59eb9acf6d0577d1 Mon Sep 17 00:00:00 2001 From: Mickael-Martin Date: Thu, 10 Oct 2019 13:35:45 +0200 Subject: [PATCH] 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 #=================================================