Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update log #125

Open
nobless opened this issue Nov 1, 2020 · 1 comment
Open

update log #125

nobless opened this issue Nov 1, 2020 · 1 comment

Comments

@nobless
Copy link

nobless commented Nov 1, 2020

/opt/openenergymonitor/EmonScripts/update/service-runner-update.sh: line 24: [: : integer expression expected
Starting update via service-runner-update.sh (v3.0) >

# Find largest log file and remove
varlog_available=$(df | awk '$NF == "/var/log" { print $4 }')
if [ "$varlog_available" -lt "1024" ]; then
    largest_log_file=$(sudo find /var/log -type f -printf "%s\t%p\n" | sort -n | tail -1 | cut -f 2)
    sudo truncate -s 0 $largest_log_file
    echo "$largest_log_file truncated to make room for update log"
fi

returns nothing:

root@ubuntu:~#  df | awk '$NF == "/var/log" { print $4 }'
root@ubuntu:~#
@CDuffers
Copy link
Contributor

Hi @TrystanLea @glynhudson ,

Can we close this issue as @borpin resolved this under #151

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants