Created
August 12, 2016 05:53
-
-
Save kujiy/c13b0f4c033ca303d2fc78875e56cbb4 to your computer and use it in GitHub Desktop.
How to install the latest stable version of zabbix_agentd automatically. How to get the latest version of zabbix-agentd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# get latest stable version | |
VER=$(curl -s http://heanet.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/ | grep -P "alt=\"\[DIR\]\" /> <a href=" | grep -v alpha | grep -v beta | awk -F'[\"]' '{print $6}' | sed -e "s/\///" | tail -1 ) | |
eyel "---------------------------------------------------" | |
eblu Install zabbix-agent version | |
egre $VER | |
eyel "---------------------------------------------------" | |
if [[ ! "$VER" =~ ^[0-9]*?\.[0-9]*?\.[0-9] ]] | |
then | |
ered "Failed to get the latest stable version of zabbix-agent." | |
exit | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment