kiwi-longtime-waterfall/compress_logs.sh

12 lines
291 B
Bash
Executable File

#!/bin/bash
ubat=$(jq '.u_bat*1000 | floor' < /tmp/solardata.json)
ubat_thr=27400
if [ "$ubat" -lt "$ubat_thr" ]; then
echo "Battery voltage ($ubat mV) is below threshold ($ubat_thr mV). Skipping compression."
exit
fi
find -name \*.csv -mtime +3 | xargs -P3 -n1 nice -n 19 ./xz_safe.sh