Add auto check functionality
CHECK_INTERVAL or SUB_CHECK_INTERVAL in module settings. If set to 1, will check everytime. Ever other number is for n days after last check. FORCE_CHECK for check if repository has been setup os now renamed FORCE_VERIFY but FORCE_CHECK is currently still honored but deprecated all *function* shell scripts will abort if run on their own Print info on last check time if set in info block Internal updates: All separator lines are now printf strings for central control. All module used config/settings file names use $MODULE name Check functionality is in its own file
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "${MODULE}" ]; then
|
||||
echo "Script cannot be run on its own";
|
||||
exit 1;
|
||||
fi;
|
||||
|
||||
if [ ${INFO} -eq 1 ]; then
|
||||
echo "--- [INFO : $(date +'%F %T')] --[${MODULE}]------------------------------------>";
|
||||
printf "${PRINTF_SUB_BLOCK}" "INFO" "$(date +'%F %T')" "${MODULE}";
|
||||
# show command on debug or dry run
|
||||
if [ ${DEBUG} -eq 1 ] || [ ${DRYRUN} -eq 1 ]; then
|
||||
echo "export BORG_BASE_DIR=\"${BASE_FOLDER}\";${BORG_COMMAND} info ${OPT_REMOTE} ${REPOSITORY}";
|
||||
|
||||
Reference in New Issue
Block a user