Browse Source

somme options on zabbix-agent install

bach 5 months ago
parent
commit
f6cfa57db6
1 changed files with 3 additions and 2 deletions
  1. 3 2
      bin/zabbix.sh

+ 3 - 2
bin/zabbix.sh

@@ -41,8 +41,6 @@ echo -n "Please provide the zabbix-server's ip : "
 read _ip
 echo -n "Please provide the hostname of this agent : "
 read _host_name
-echo -n "Please provide the mysql root password : "
-read _root_mysql_passwd
 
 _agent_conf_d="/etc/zabbix/zabbix_agentd.d" # for debian 8
 if [ ! -d "$_agent_conf_d" ]; then
@@ -74,6 +72,9 @@ echo -n "monitor mysql? [Y|n] "
 read yn
 yn=${yn:-y}
 if [ "$yn" = "Y" ] || [ "$yn" = "y" ]; then
+  echo -n "Please provide the mysql root password : "
+  read _root_mysql_passwd
+
   mkdir /var/lib/zabbix
   # generate random password for zabbix mysql user
   _passwd="$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12)"