Last active
September 17, 2021 14:31
-
-
Save andretapxure/2889c11b87fd93a02447ce2d7b686ff4 to your computer and use it in GitHub Desktop.
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 | |
| sudo service zabbix-agent stop | |
| sudo apt -y remove zabbix-agent | |
| sudo wget https://repo.zabbix.com/zabbix/5.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.2-1+ubuntu$(lsb_release -sr)_all.deb | |
| sudo dpkg -i zabbix-release_5.2-1+ubuntu$(lsb_release -sr)_all.deb | |
| sudo apt update | |
| sudo apt -y install zabbix-agent2 | |
| sudo sed -i 's/Server=127.0.0.1/Server=$1/g' /etc/zabbix/zabbix_agent2.conf | |
| sudo sed -i 's/ServerActive=127.0.0.1/#ServerActive=127.0.0.1/g' /etc/zabbix/zabbix_agent2.conf | |
| sudo sed -i 's/Hostname=Zabbix server/#Hostname=Zabbix server/g' /etc/zabbix/zabbix_agent2.conf | |
| sudo service zabbix-agent2 restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment