Fix print0 position and backslash, set pipefail, allow overriding variables
First, a backslash was missing, causing /usr/share/tuxis-cron/cronscripts/prune-dir.cron: line 38: -ctime: command not found
.
Second, -print0
is executed when the conditions preceding it match. It was placed after the -type
condition, and before the -ctime
condition, meaning all files in the given directory are deleted.
Third, due to the missing 'pipefail' option, issues with the find
command were not reported.
Fourth, it was not possible to override variables (including ESCALATE_MAILTO
). The local config file is now sourced.
Edited by William Edwards