openwrt-openwisp-monitoring
openwrt-openwisp-monitoring copied to clipboard
[enhancement] Move logger calls in subroutine #57
trafficstars
Closes #57
Removed logger calls to simplify the script
This PR is tested and it works as expected. I will rebase and mark is as Ready for Review once #72 is merged
sh-checker report
To get the full details, please check in the job output.
shellcheck errors
'shellcheck ' returned error 1 finding the following syntactical issues:
----------
In monitoring_init line 15:
local cfg="$1"
^-------^ SC3043: In POSIX sh, 'local' is undefined.
In monitoring_init line 16:
local flag="$2"
^--------^ SC3043: In POSIX sh, 'local' is undefined.
In monitoring_init line 17:
local option="$3"
^----------^ SC3043: In POSIX sh, 'local' is undefined.
In monitoring_init line 18:
local default="$4"
^-----------^ SC3043: In POSIX sh, 'local' is undefined.
In monitoring_init line 19:
local value
^---------^ SC3043: In POSIX sh, 'local' is undefined.
For more information:
https://www.shellcheck.net/wiki/SC3043 -- In POSIX sh, 'local' is undefined.
----------
You can address the above issues in one of three ways:
1. Manually correct the issue in the offending shell script;
2. Disable specific issues by adding the comment:
# shellcheck disable=NNNN
above the line that contains the issue, where NNNN is the error code;
3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.
shfmt errors
'shfmt ' found no issues.