Bachir Soussi Chiadmi 5 лет назад
Родитель
Сommit
c671c5e914
1 измененных файлов с 6 добавлено и 5 удалено
  1. 6 5
      bin/zabbix.sh

+ 6 - 5
bin/zabbix.sh

@@ -22,16 +22,17 @@ if [ ! -d "$_assets" ]; then
   fi
 fi
 
-apk add zabbix-agent
-
 echo -n "do you want to limit zabbix-agent to 3.4? [y|n] "
 read yn
 if [ "$yn" = "Y" ] || [ "$yn" = "y" ]; then
   echo -e "Stick with zabbix-agent 3.4"
   echo "http://dl-cdn.alpinelinux.org/alpine/v3.8/main" >> /etc/apk/repositories
-  # echo -e "zabbix-agent<3.4.99" >> /etc/apk/world
-  sed -i "s|zabbix-agent|zabbix-agent<3.4.99|g" /etc/apk/world
-  apk update && apk upgrade
+  echo "http://dl-cdn.alpinelinux.org/alpine/v3.8/community" >> /etc/apk/repositories
+  echo -e "zabbix-agent<3.4.99" >> /etc/apk/world
+  apk update
+  apk upgrade
+else
+  apk add zabbix-agent
 fi