Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly detect haproxy stats credentials #6

Merged
merged 1 commit into from
Sep 21, 2017

Conversation

javacruft
Copy link
Collaborator

Scope grep for stats auth credentials to haproxy configuration
file, rather than the entire /etc/haproxy directory.

See: https://bugs.launchpad.net/charm-helpers/+bug/1713165

Scope grep for stats auth credentials to haproxy configuration
file, rather than the entire /etc/haproxy directory.

See: https://bugs.launchpad.net/charm-helpers/+bug/1713165
@johnsca johnsca merged commit a96eee6 into juju:master Sep 21, 2017
@tbaumann
Copy link

tbaumann commented Dec 15, 2017

This changes the grep result. Hence it needs a different undex too.

$ grep -r "stats auth" /etc/haproxy/haproxy.cfg
    stats auth admin:ktTZdNcpKpFYN7Jf42PgVZm5nFJ3zKz3
$ grep -r "stats auth" /etc/haproxy
/etc/haproxy/haproxy.cfg:    stats auth admin:ktTZdNcpKpFYN7Jf42PgVZm5nFJ3zKz3
AUTH=$(grep -r "stats auth" /etc/haproxy/haproxy.cfg | awk 'NR=1{print $4}')

vs

AUTH=$(grep -r "stats auth" /etc/haproxy/haproxy.cfg | awk 'NR=1{print $3}')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants