Skip to content

Commit

Permalink
fixup some graphs1090 env vars (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf authored Sep 6, 2024
1 parent 42219cd commit 7c9ee41
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions rootfs/etc/s6-overlay/startup.d/08-graphs1090-init
Original file line number Diff line number Diff line change
Expand Up @@ -135,30 +135,30 @@ fi

# Defines the width of the larger graphs.
if [[ -n "${GRAPHS1090_LARGE_WIDTH}" ]]; then
sed -i "s|lwidth=.*|lwidth=${GRAPHS1090_LARGE_WIDTH}|g" /etc/default/graphs1090
sed -i "s|^lwidth=.*|lwidth=${GRAPHS1090_LARGE_WIDTH}|g" /etc/default/graphs1090
else
sed -i "s|lwidth=.*|lwidth=1096|g" /etc/default/graphs1090
sed -i "s|^lwidth=.*|lwidth=1096|g" /etc/default/graphs1090
fi

# Defines the height of the larger graphs.
if [[ -n "${GRAPHS1090_LARGE_HEIGHT}" ]]; then
sed -i "s|lheight=.*|lheight=${GRAPHS1090_LARGE_HEIGHT}|g" /etc/default/graphs1090
sed -i "s|^lheight=.*|lheight=${GRAPHS1090_LARGE_HEIGHT}|g" /etc/default/graphs1090
else
sed -i "s|lheight=.*|lheight=235|g" /etc/default/graphs1090
sed -i "s|^lheight=.*|lheight=235|g" /etc/default/graphs1090
fi

# Defines the width of the smaller graphs.
if [[ -n "${GRAPHS1090_SMALL_WIDTH}" ]]; then
sed -i "s|lwidth=.*|lwidth=${GRAPHS1090_SMALL_WIDTH}|g" /etc/default/graphs1090
sed -i "s|^swidth=.*|swidth=${GRAPHS1090_SMALL_WIDTH}|g" /etc/default/graphs1090
else
sed -i "s|lwidth=.*|lwidth=1096|g" /etc/default/graphs1090
sed -i "s|^swidth=.*|swidth=619|g" /etc/default/graphs1090
fi

# Defines the height of the smaller graphs.
if [[ -n "${GRAPHS1090_SMALL_HEIGHT}" ]]; then
sed -i "s|lheight=.*|lheight=${GRAPHS1090_SMALL_HEIGHT}|g" /etc/default/graphs1090
sed -i "s|^sheight=.*|sheight=${GRAPHS1090_SMALL_HEIGHT}|g" /etc/default/graphs1090
else
sed -i "s|lheight=.*|lheight=235|g" /etc/default/graphs1090
sed -i "s|^sheight=.*|sheight=324|g" /etc/default/graphs1090
fi

# Sets disk device for graphs -- leave empty for default.
Expand Down

0 comments on commit 7c9ee41

Please sign in to comment.