mirror of
https://github.com/YunoHost-Apps/zabbix_ynh.git
synced 2024-09-03 20:36:14 +02:00
add ynh_install_extra_repo
This commit is contained in:
parent
fe85a9375b
commit
86e912a42c
1 changed files with 8 additions and 11 deletions
|
@ -111,23 +111,20 @@ if [ $timeout_ok -ne 1 ] ;then
|
||||||
systemctl enable zabbix-agent && systemctl restart zabbix-agent
|
systemctl enable zabbix-agent && systemctl restart zabbix-agent
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#patch if zabbix-release installed
|
||||||
|
if [ "$(dpkg -l zabbix-release 2>/dev/null | wc -l)" -ne 0 ];then
|
||||||
|
DEBIAN_FRONTEND=noninteractive apt purge zabbix-release -y
|
||||||
|
ynh_add_extra_apt_repos__3_path=$(find /var/cache/yunohost/ -name "ynh_add_extra_apt_repos__3")
|
||||||
|
source "$ynh_add_extra_apt_repos__3_path"
|
||||||
|
ynh_install_extra_repo --repo=http://repo.zabbix.com/zabbix/4.2/debian --key=https://repo.zabbix.com/zabbix-official-repo.key --priority=999
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
#=================================================
|
#=================================================
|
||||||
#REMOVE DUPLICATE LOG ENTRY IN LOGROTATE PATCH IF NEEDED
|
#REMOVE DUPLICATE LOG ENTRY IN LOGROTATE PATCH IF NEEDED
|
||||||
ynh_remove_logrotate
|
ynh_remove_logrotate
|
||||||
|
|
||||||
zabbixRepoInstalledVersion=$(apt-cache policy zabbix-release | sed -n '2p' | grep -Po ".*: \K(.*)")
|
|
||||||
|
|
||||||
if [ "$trustedVersionRepo" != "$zabbixRepoInstalledVersion" ];then
|
|
||||||
DEBIAN_FRONTEND=noninteractive apt remove zabbix-release -y
|
|
||||||
ynh_print_info "Install New Zabbix repository"
|
|
||||||
|
|
||||||
wget -q "https://repo.zabbix.com/zabbix/4.2/debian/pool/main/z/zabbix-release/zabbix-release_4.2-1%2Bstretch_all.deb"
|
|
||||||
dpkg -i zabbix-release_*.deb
|
|
||||||
rm zabbix-release_*.deb
|
|
||||||
fi
|
|
||||||
|
|
||||||
ynh_print_info "Check if new zabbix version is available on repo"
|
ynh_print_info "Check if new zabbix version is available on repo"
|
||||||
ynh_package_update
|
ynh_package_update
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue