From 521f568f284dd053aac1c7e7567b7330e594169d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Anguita=20L=C3=B3pez?= Date: Wed, 11 Sep 2024 17:43:42 +0200 Subject: [PATCH] change filebeat passwords only when needed --- passwords_tool/passwordsFunctions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/passwords_tool/passwordsFunctions.sh b/passwords_tool/passwordsFunctions.sh index 2316640..db803ed 100644 --- a/passwords_tool/passwordsFunctions.sh +++ b/passwords_tool/passwordsFunctions.sh @@ -46,7 +46,7 @@ function passwords_changePassword() { fi if [ "${nuser}" == "admin" ] || [ -n "${changeall}" ]; then - if [ -n "${filebeat_installed}" ]; then + if [ -n "${filebeat_installed}" ] && [ -z "${dashboard}" ]; then file_username=$(grep "username:" /etc/filebeat/filebeat.yml | awk '{print $2}') file_password=$(grep "password:" /etc/filebeat/filebeat.yml | awk '{print $2}') if [ "$file_username" != "\${username}" ] || [ "$file_password" != "\${password}" ]; then