fix: SC2162 shellcheck fixes.

This commit is contained in:
Robert Wlodarczyk 2022-07-16 08:17:17 -07:00
parent 4d945526fe
commit 96e699c4d7

View File

@ -184,7 +184,7 @@ function build_crontab() {
rm -rf ${CRONTAB_FILE} rm -rf ${CRONTAB_FILE}
ONSTART=() ONSTART=()
while read i ; do while read -r i ; do
SCHEDULE=$(jq -r .["$i"].schedule "${CONFIG}" | sed 's/\*/\\*/g') SCHEDULE=$(jq -r .["$i"].schedule "${CONFIG}" | sed 's/\*/\\*/g')
if [ "${SCHEDULE}" == "null" ]; then if [ "${SCHEDULE}" == "null" ]; then
@ -228,7 +228,7 @@ EOF
if [ "$(jq -r .["$i"].trigger "${CONFIG}")" != "null" ]; then if [ "$(jq -r .["$i"].trigger "${CONFIG}")" != "null" ]; then
while read j ; do while read -r j ; do
if [ "$(jq .["$i"].trigger["$j"].command "${CONFIG}")" == "null" ]; then if [ "$(jq .["$i"].trigger["$j"].command "${CONFIG}")" == "null" ]; then
echo "Command Missing: $(jq -r .["$i"].trigger["$j"].command "${CONFIG}")" echo "Command Missing: $(jq -r .["$i"].trigger["$j"].command "${CONFIG}")"
continue continue