Skip to content

Commit

Permalink
add env var to append to /etc/default/graphs1090 (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf authored Sep 6, 2024
1 parent 855c4c4 commit 42219cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ docker exec -it tar1090 /usr/local/bin/viewadsb --cpr-focus 3D3ED0
| `GRAPHS1090_WWW_TITLE` | Set title for the web page (displayed in the browser title or tab bar) | `graphs1090` |
| `GRAPHS1090_WWW_HEADER` | Set header text for the web page | `Perf. Graphs` |
| `GRAPHS1090_HIDE_SYSTEM` | Hide the system graphs and don't render them, don't collect system data | `no` |
| `GRAPHS1090_DEFAULT_APPEND` | Append to /etc/default/graphs1090, see <https://github.com/wiedehopf/graphs1090/blob/master/default> | Unset |

### Enabling UAT data

Expand Down
4 changes: 4 additions & 0 deletions rootfs/etc/s6-overlay/startup.d/08-graphs1090-init
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ if [[ -n "${GRAPHS1090_WWW_HEADER}" ]]; then
sed -i "s|WWW_HEADER=.*|WWW_HEADER=\"${GRAPHS1090_WWW_HEADER}\"|g" /etc/default/graphs1090
fi

if [[ -n "$GRAPHS1090_DEFAULT_APPEND" ]]; then
echo "$GRAPHS1090_DEFAULT_APPEND" >> /etc/default/graphs1090
fi

# Finally, add a link to graphs1090 to the tar1090 web page:
TAR1090_INDEX_HTML="/usr/local/share/tar1090/html-webroot/index.html"
if ! grep -qs -e 'Stats available <a href=' "$TAR1090_INDEX_HTML"; then
Expand Down

0 comments on commit 42219cd

Please sign in to comment.