1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/zabbix_ynh.git synced 2024-09-03 20:36:14 +02:00

removing dependencies snmp-mibs-downloader

This commit is contained in:
Mickael-Martin 2019-03-07 13:41:23 +01:00
parent 3289cd3faf
commit b5c354a591

View file

@ -87,7 +87,11 @@ path_url=$(ynh_normalize_url_path "$path_url")
#REMOVE NONFREE PART PATCH IF NEEDED (snmp-mibs-downloader (non-free) installed in version 1) #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) 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 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 ynh_print_info "Removing snmp-mibs-downloader (non-free package)"
sed -i.$(date "+%m%d%y") 's/ snmp-mibs-downloader,//g' /var/lib/dpkg/status
DEBIAN_FRONTEND=noninteractive apt purge snmp-mibs-downloader
if [ -f /etc/apt/sources.list.d/non-free.list ];then
ynh_secure_remove /etc/apt/sources.list.d/non-free.list
fi fi
#================================================= #=================================================