forked from evolix/evocheck
IS_EVOBACKUP_EXCLUDE_MOUNT: exclude scripts without Rsync command
This commit is contained in:
parent
7ff09cd973
commit
7a57016da1
|
@ -7,6 +7,8 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
IS_EVOBACKUP_EXCLUDE_MOUNT: exclude scripts without Rsync command
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
|
@ -601,6 +601,8 @@ check_evobackup_exclude_mount() {
|
||||||
|
|
||||||
# shellcheck disable=SC2044
|
# shellcheck disable=SC2044
|
||||||
for evobackup_file in $(find /etc/cron* -name '*evobackup*' | grep -v -E ".disabled$"); do
|
for evobackup_file in $(find /etc/cron* -name '*evobackup*' | grep -v -E ".disabled$"); do
|
||||||
|
# if the file seems to be a backup script, with an Rsync invocation
|
||||||
|
if grep -q "^\s*rsync" "${evobackup_file}"; then
|
||||||
# If rsync is not limited by "one-file-system"
|
# If rsync is not limited by "one-file-system"
|
||||||
# then we verify that every mount is excluded
|
# then we verify that every mount is excluded
|
||||||
if ! grep -q -- "^\s*--one-file-system" "${evobackup_file}"; then
|
if ! grep -q -- "^\s*--one-file-system" "${evobackup_file}"; then
|
||||||
|
@ -610,6 +612,7 @@ check_evobackup_exclude_mount() {
|
||||||
failed "IS_EVOBACKUP_EXCLUDE_MOUNT" "${mount} is not excluded from ${evobackup_file} backup script"
|
failed "IS_EVOBACKUP_EXCLUDE_MOUNT" "${mount} is not excluded from ${evobackup_file} backup script"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
# Verification de la presence du userlogrotate
|
# Verification de la presence du userlogrotate
|
||||||
|
@ -1429,7 +1432,7 @@ get_version() {
|
||||||
grep '^VERSION=' "${command}" | head -1 | cut -d '=' -f 2
|
grep '^VERSION=' "${command}" | head -1 | cut -d '=' -f 2
|
||||||
;;
|
;;
|
||||||
minifirewall)
|
minifirewall)
|
||||||
${command} status | head -1 | cut -d ' ' -f 3
|
${command} version | head -1 | cut -d ' ' -f 3
|
||||||
;;
|
;;
|
||||||
## Let's try the --version flag before falling back to grep for the constant
|
## Let's try the --version flag before falling back to grep for the constant
|
||||||
kvmstats)
|
kvmstats)
|
||||||
|
|
Loading…
Reference in a new issue