Skip to content

Commit

Permalink
[chores] Add commment to explain why we check for file existence
Browse files Browse the repository at this point in the history
  • Loading branch information
devkapilbansal committed Oct 15, 2021
1 parent 9742f36 commit bb2907c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions openwrt-openwisp-monitoring/files/monitoring.agent
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ check_available_memory() {
# enough memory not available, deleting old data
# shellcheck disable=SC2012
file="$TMP_DIR/$(ls -1t "$TMP_DIR" | tail -1)"
# ensure that temporary directory is not empty
if [ -f "$file" ]; then
rm "$file"
else
Expand Down

0 comments on commit bb2907c

Please sign in to comment.