IS_EVOBACKUP_EXCLUDE_MOUNT: exclude disabled backup scripts
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Jérémy Lecour 2020-05-11 17:18:04 +02:00 committed by Jérémy Lecour
parent ddba7cbed9
commit 5e4b60e61b
2 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,8 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp
### Changed
* IS_EVOBACKUP_EXCLUDE_MOUNT: exclude disabled backup scripts
### Deprecated
### Removed

View File

@ -559,7 +559,7 @@ check_evobackup_exclude_mount() {
# shellcheck disable=SC2064
trap "rm -f ${excludes_file}" 0
# shellcheck disable=SC2044
for evobackup_file in $(find /etc/cron* -name '*evobackup*'); do
for evobackup_file in $(find /etc/cron* -name '*evobackup*' | grep -v -E ".disabled$"); do
grep -- "--exclude " "${evobackup_file}" | grep -E -o "\"[^\"]+\"" | tr -d '"' > "${excludes_file}"
not_excluded=$(findmnt --type nfs,nfs4,fuse.sshfs, -o target --noheadings | grep -v -f "${excludes_file}")
for mount in ${not_excluded}; do