diff --git a/zabbix_agent.sh b/zabbix_agent.sh index 9ba9bc2..1cbde73 100644 --- a/zabbix_agent.sh +++ b/zabbix_agent.sh @@ -85,7 +85,7 @@ fi cheeck before running this as it adds lines to keep comments -if [ $(grep -c Hostname=Zabbix /etc/zabbix/zabbix_agentd.conf) -eq 0 ]; then +if [ $(grep -c Hostname=Zabbix /etc/zabbix/zabbix_agentd.conf) -eq 1 ]; then # ask for the hostname read -e -p "Enter Hostname: " -i "$(cat /etc/hostname)" hostname