Skip to content

Commit

Permalink
make GRAPHS1090_DISK_DEVICE env var work for every device name (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf authored Aug 14, 2024
1 parent 1b27e2c commit 9661742
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rootfs/etc/s6-overlay/startup.d/08-graphs1090-init
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,10 @@ fi
# Sets disk device for graphs -- leave empty for default.
if [[ -n "${GRAPHS1090_DISK_DEVICE}" ]]; then
sed -i "s|disk=.*|disk=${GRAPHS1090_DISK_DEVICE}|g" /etc/default/graphs1090
else
sed -i "s|disk=.*|disk=|g" /etc/default/graphs1090
# if this disk isn't already in collectd.conf, replace the hda entry with the specified disk
if ! grep -qs "Disk \"${GRAPHS1090_DISK_DEVICE}\"" /etc/collectd/collectd.conf; then
sed -i "s|Disk \"hda\"|Disk \"${GRAPHS1090_DISK_DEVICE}\"|g" /etc/collectd/collectd.conf
fi
fi

# Sets (wired) ethernet device for graphs -- leave empty for default.
Expand Down

0 comments on commit 9661742

Please sign in to comment.