Quellcode durchsuchen

fixed zabbix-agent 3.4.15

Bachir Soussi Chiadmi vor 5 Jahren
Ursprung
Commit
c671c5e914
1 geänderte Dateien mit 6 neuen und 5 gelöschten Zeilen
  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