Commit 8f19069f authored by Vinicius Ruoso's avatar Vinicius Ruoso

Using test command to evaluate 'if' expression on status.po

Part of the adaptation to the POSIX standard.
Signed-off-by: default avatarVinicius Ruoso <vkr07@c3sl.ufpr.br>
parent 8e9cfb0e
......@@ -13,8 +13,9 @@ status_www()
STATES=""
if test -f $DATAPATH/last_contact; then
LAST=$(tail -1 $DATAPATH/last_contact)
CURRENT=$(date +%s)
# 1 week = 604800 seconds
if (( $(date +%s)-$LAST > 604800 )); then
if test $((CURRENT-LAST)) -gt 604800; then
STATES="status_longoffline_st:true"
else
STATES="status_longoffline_st:false"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment