mirror of
https://github.com/YunoHost-Apps/zabbix_ynh.git
synced 2024-09-03 20:36:14 +02:00
remove old (v1) nonfree part
This commit is contained in:
parent
06a52c20ae
commit
ff3e0bd359
1 changed files with 8 additions and 19 deletions
|
@ -24,8 +24,6 @@ final_path=$(ynh_app_setting_get "$app" final_path)
|
|||
db_name=$(ynh_app_setting_get "$app" db_name)
|
||||
db_user=$(ynh_app_setting_get "$app" db_user)
|
||||
db_pwd=$(ynh_app_setting_get "$app" mysqlpwd)
|
||||
nonfree=$(ynh_app_setting_get "$app" nonfree)
|
||||
|
||||
|
||||
#=================================================
|
||||
# ENSURE DOWNWARD COMPATIBILITY
|
||||
|
@ -86,6 +84,12 @@ disable_guest_user
|
|||
# Normalize the URL path syntax
|
||||
path_url=$(ynh_normalize_url_path "$path_url")
|
||||
|
||||
#REMOVE NONFREE PART PATCH IF NEEDED (snmp-mibs-downloader (non-free) installed in version 1)
|
||||
nonfreepackagelist=$(dpkg-query -W -f='${Section}\t${Package}\n' | grep ^non-free)
|
||||
if [ $(echo $nonfreepackagelist | wc -l) -eq 1 ] && [ $(echo $nonfreepackagelist | grep -c "snmp-mibs-downloader") -eq 1 ] ;then
|
||||
rm /etc/apt/sources.list.d/non-free.list
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
|
@ -127,24 +131,9 @@ then
|
|||
|
||||
DEBIAN_FRONTEND=noninteractive apt-mark unhold zabbix-server-mysql zabbix-frontend-php
|
||||
|
||||
ynh_print_info "Install non-free repository with pinning"
|
||||
if [ $nonfree ];then
|
||||
echo "deb http://deb.debian.org/debian stretch non-free" >/etc/apt/sources.list.d/non-free.list
|
||||
nonfreefilerepo=$(find /var/cache/yunohost/ -name "non-free_policy")
|
||||
packagenonfreefilerepo=$(find /var/cache/yunohost/ -name "snmp-mibs-downloader_nonfree")
|
||||
cp $nonfreefilerepo /etc/apt/preferences.d/
|
||||
cp $packagenonfreefilerepo /etc/apt/preferences.d/
|
||||
fi
|
||||
|
||||
ynh_print_info "Update and install dependencies"
|
||||
ynh_package_update
|
||||
if [ $nonfree ];then
|
||||
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 snmp-mibs-downloader libjs-prototype jq
|
||||
else
|
||||
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
|
||||
|
||||
fi
|
||||
|
||||
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
|
||||
ynh_package_install zabbix-server-mysql zabbix-agent zabbix-frontend-php
|
||||
DEBIAN_FRONTEND=noninteractive apt-mark hold zabbix-server-mysql zabbix-frontend-php
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue