From 2a264dd2bccd71060afb0e277ccd7839ab0edaa0 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Fri, 12 Apr 2024 15:54:20 +0200 Subject: [PATCH] redis: replace inline argument with environment variable for the password --- CHANGELOG.md | 1 + nagios-nrpe/files/plugins/check_sentinel | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fb17809..e53b4e80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ The **patch** part is incremented if multiple releases happen the same month * fail2ban: SQLite purge script didn't vacuum as expected + error when vacuum cannot be done * nagios-nrpe: create /etc/bash_completion.d if missing * packweb: fix old bug (2017!) .orig file created by module patch and taken in account by ProFTPd +* redis: replace inline argument with environment variable for the password ### Removed diff --git a/nagios-nrpe/files/plugins/check_sentinel b/nagios-nrpe/files/plugins/check_sentinel index a76e45e7..6d28b120 100755 --- a/nagios-nrpe/files/plugins/check_sentinel +++ b/nagios-nrpe/files/plugins/check_sentinel @@ -104,7 +104,7 @@ redis_cli_args='' sentinel_port=$(awk '/^port/{print $2}' "${sentinel_config_file}") ! test -z "$sentinel_port" && redis_cli_args="${redis_cli_args} -p ${sentinel_port}" sentinel_pass=$(awk '/^requirepass/{print $2}' "${sentinel_config_file}") -! test -z "$sentinel_pass" && redis_cli_args="${redis_cli_args} --pass ${sentinel_pass}" +! test -z "$sentinel_pass" && export REDISCLI_AUTH="${sentinel_pass}" alias _redis-cli="redis-cli ${redis_cli_args}" # List all masters names known by sentinel