Added a bit of documentation

This commit is contained in:
Tristan Ancelet 2023-05-15 18:19:03 -05:00
parent 00ea4ef63d
commit a4c9bf993a

View File

@ -31,7 +31,9 @@ for dir in ${crontab_dirs[@]}; do
INSERT INTO crontabs (crontab_path, crontab_data) VALUES INSERT INTO crontabs (crontab_path, crontab_data) VALUES
('$file', ('$file',
'$($"$(<$file)")'); '$($"$(<$file)")');
" " # (2023-05-15)
# Had to add the $"..." to the statement above because the script was attempting to load
# and execute the script on trying to load it into the db
fi fi
done done
fi fi
@ -50,7 +52,9 @@ while read crontab_id crontab_path; do
if [[ -f "$crontab_path" ]] && [[ ! "$data" == "$(<$crontab_path)" ]]; then if [[ -f "$crontab_path" ]] && [[ ! "$data" == "$(<$crontab_path)" ]]; then
sqlite3 $WEBCRON_DB " sqlite3 $WEBCRON_DB "
UPDATE crontabs SET crontab_data = '$($"(<$crontab_path)")' WHERE crontab_id = $crontab_id UPDATE crontabs SET crontab_data = '$($"(<$crontab_path)")' WHERE crontab_id = $crontab_id
" " # (2023-05-15)
# Had to add the $"..." to the statement above because the script was attempting to load
# and execute the script on trying to load it into the db
fi fi
done <<< ` sqlite3 $WEBCRON_DB <<< " done <<< ` sqlite3 $WEBCRON_DB <<< "