Improve check-webcron.sh output formatting

The code changes add a printf statement to format the output of the check-webcron.sh script. The new format rounds the value to three decimal places, improving readability.
This commit is contained in:
Jeroen De Meerleer 2023-06-02 13:51:38 +02:00
parent 05220c207a
commit 540ad83ef8
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
1 changed files with 1 additions and 2 deletions

View File

@ -102,8 +102,7 @@ jobsdue=$(echo $health | jq '.JobsDue')
jobsrunning=$(echo $health | jq '.JobsRunning')
jobsfailing=$(echo $health | jq '.JobsFailing')
val=$(echo "$jobsfailing/$jobstotal" | bc -l)
val=$(printf %.3f $(echo "$jobsfailing/$jobstotal" | bc -l))
rdetail=""
if (( $(echo "$RESPONSE_CODE != 200" | bc -l) )); then
rval=2