Skip to content

Commit

Permalink
Fixes empty file bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicopace committed Jun 17, 2019
1 parent 1000d76 commit f994904
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -27,7 +27,7 @@ get_uptime()

cacheFile="/tmp/shared-state-get_candidates_neigh.cache"
lastRunFile="/tmp/shared-state-get_candidates_neigh.lastrun"
lastRun=$(cat "$lastRunFile" 2>/dev/null || echo -9999)
lastRun=$(if [ -s /tmp/shared-state-get_candidates_neigh.lastrun ]; then echo $(cat /tmp/shared-state-get_candidates_neigh.lastrun); else echo -9999; fi)
currUptime="$(get_uptime)"

[ "$(($currUptime - $lastRun))" -lt "90" ] &&
Expand Down

0 comments on commit f994904

Please sign in to comment.