So, I just added the script on a fres TrueNas install (TrueNAS-SCALE-22.12.3.3) and activated UPS reporting. Everything works great and I receive the email reports as expected.
Except, I started getting a new extra error email with the following error "Init SSL without certificate database". Upon digging further I narrowed this down to upsc. It seem it needs some credentials to be setup which are not active by default. See below research:
I applied the following changes to supress the error (essentially send the error to /dev/null)
readarray -t "upslist" <<< "$(upsc -l "${host}" > /dev/stdout 2> /dev/null)"
Hope this helps more folks get rid of the same issue!
So, I just added the script on a fres TrueNas install (TrueNAS-SCALE-22.12.3.3) and activated UPS reporting. Everything works great and I receive the email reports as expected.
Except, I started getting a new extra error email with the following error "Init SSL without certificate database". Upon digging further I narrowed this down to
upsc
. It seem it needs some credentials to be setup which are not active by default. See below research:The fix for
upsc
seems unclear. Hoever, I managed to find an alternative to suppress the error. I narrowed down the error to this line: https://github.com/dak180/FreeNAS-Report/blob/bc84a5553410f8c048c80403fa6865501fb4b4cf/report.sh#L2131I applied the following changes to supress the error (essentially send the error to /dev/null)
readarray -t "upslist" <<< "$(upsc -l "${host}" > /dev/stdout 2> /dev/null)"
Hope this helps more folks get rid of the same issue!
(PS. Happy to provide info for debugging)