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

allow configuration of a site title for graphs1090 #191

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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