From 4f8a9ceecc087543c094e7aa1d3f13cc6f8a0b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lecour?= Date: Fri, 22 Mar 2019 22:45:45 +0100 Subject: [PATCH] fix quotes --- evocheck.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evocheck.sh b/evocheck.sh index 8265644..0bca172 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -921,12 +921,12 @@ if is_debian; then # You could change the default path in /etc/evocheck.cf MONGO_BACKUP_PATH=${MONGO_BACKUP_PATH:-"/home/backup/mongodump"} if [ -d "$MONGO_BACKUP_PATH" ]; then - for file in "${MONGO_BACKUP_PATH}/*/*.{json,bson}"; do + for file in "${MONGO_BACKUP_PATH}"/*/*.{json,bson}; do # Skip indexes file. if ! [[ "$file" =~ indexes ]]; then limit=$(date +"%s" -d "now - 2 day") - updated_at=$(stat -c "%Y" $file) - if [ -f "$file" ] && [ $limit -gt $updated_at ]; then + updated_at=$(stat -c "%Y" "$file") + if [ -f "$file" ] && [ "$limit" -gt "$updated_at" ]; then failed "IS_MONGO_BACKUP" "MongoDB hasn't been dumped for more than 2 days" break fi