Skip to content

Commit

Permalink
fix variable check on enable graphite
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxmea committed Jan 30, 2024
1 parent 9beecc3 commit b3b8513
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion puppetserver/docker-entrypoint.d/84-enable_graphite.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

if [[ "$PUPPETSERVER_GRAPHITE_EXPORTER_ENABLED" == "true" ]]; then
if [ -n "$PUPPETSERVER_GRAPHITE_HOST" and -n "$PUPPETSERVER_GRAPHITE_PORT" ]; then
if [[ -n "$PUPPETSERVER_GRAPHITE_HOST" && -n "$PUPPETSERVER_GRAPHITE_PORT" ]]; then
echo "Enabling graphite exporter"
sed -e "s/GRAPHITE_HOST/$PUPPETSERVER_GRAPHITE_HOST/" -e "s/GRAPHITE_PORT/$PUPPETSERVER_GRAPHITE_PORT/" /metrics.conf.tmpl > /etc/puppetlabs/puppetserver/conf.d/metrics.conf
else
Expand Down

0 comments on commit b3b8513

Please sign in to comment.