Skip to content

Commit

Permalink
allow configuration of a site title for graphs1090
Browse files Browse the repository at this point in the history
Especially when looking at the data for several sites it's nice to be able to
tell which site you are looking at.

Signed-off-by: Dirk Hohndel <[email protected]>
  • Loading branch information
dirkhh committed May 26, 2024
1 parent c0b0b91 commit eb12a52
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rootfs/etc/s6-overlay/startup.d/08-graphs1090-init
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ else
sed -i 's|colorscheme=dark|colorscheme=default|g' /etc/default/graphs1090
fi

# use site name if provided:
if [[ -n "${GRAPHS1090_SITENAME}" ]]; then
sed -i "s/<title>graphs1090: Performance Graphs<\/title>/<title>$GRAPHS1090_SITENAME: Performance Graphs<\/title>/" /usr/share/graphs1090/html/index.html
sed -i "s/<h1>Performance Graphs<\/h1>/<h1>Performance Graphs ($GRAPHS1090_SITENAME)<\/h1>/" /usr/share/graphs1090/html/index.html
fi

# Set Interval in seconds to feed data into RRD files.
if [[ -n "${GRAPHS1090_RRD_STEP}" ]]; then
sed -i "s|DRAW_INTERVAL=.*|DRAW_INTERVAL=${GRAPHS1090_RRD_STEP}|g" /etc/default/graphs1090
Expand Down

0 comments on commit eb12a52

Please sign in to comment.