12 lines
291 B
Bash
Executable file
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
|