mirror of
https://github.com/AlexMacocian/ServerManagementUtils.git
synced 2026-07-15 15:19:58 +00:00
Fix verifier
This commit is contained in:
@@ -56,7 +56,7 @@ UpdateFilebeatConfig() {
|
||||
|
||||
if grep -q "username: \"$user\"" "$temp_file" && \
|
||||
grep -q "password: \"$password\"" "$temp_file" && \
|
||||
grep -q "hosts: [\"$host\"]" "$temp_file"; then
|
||||
grep -q "hosts: \[\"$host\"\]" "$temp_file"; then
|
||||
mv "$temp_file" "$config_file"
|
||||
LogInformation "Updated Elasticsearch settings: user=$user"
|
||||
else
|
||||
|
||||
@@ -56,7 +56,7 @@ UpdateOutputConfig() {
|
||||
|
||||
if grep -q "user => \"$user\"" "$temp_file" && \
|
||||
grep -q "password => \"$password\"" "$temp_file" && \
|
||||
grep -q "hosts => [\"$host\"]" "$temp_file"; then
|
||||
grep -q "hosts => \[\"$host\"\]" "$temp_file"; then
|
||||
mv "$temp_file" "$output_file"
|
||||
LogInformation "Updated Elasticsearch settings: user=$user"
|
||||
else
|
||||
|
||||
@@ -56,7 +56,7 @@ UpdateMetricbeatConfig() {
|
||||
|
||||
if grep -q "username: \"$user\"" "$temp_file" && \
|
||||
grep -q "password: \"$password\"" "$temp_file" && \
|
||||
grep -q "hosts: [\"$host\"]" "$temp_file"; then
|
||||
grep -q "hosts: \[\"$host\"\]" "$temp_file"; then
|
||||
mv "$temp_file" "$config_file"
|
||||
LogInformation "Updated Elasticsearch settings: user=$user"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user