From 7179cfefc8e754c7fff5dffbb9e4f0ec30256761 Mon Sep 17 00:00:00 2001 From: Victor LABORIE Date: Fri, 21 Dec 2018 15:21:08 +0100 Subject: [PATCH] Remove "No such file or directory" error on IS_NOTUPGRADED check --- evocheck.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/evocheck.sh b/evocheck.sh index 94b5211..1730999 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -523,8 +523,8 @@ if [ -e /etc/debian_version ]; then # Check if no package has been upgraded since $limit. if [ "$IS_NOTUPGRADED" = 1 ]; then last_upgrade=$(date +%s -d $(zgrep -h upgrade /var/log/dpkg.log* |sort -n |tail -1 |cut -f1 -d ' ')) - if grep -q '^mailto="listupgrade-todo@' /etc/evolinux/listupgrade.cnf \ - || grep -q -E '^[[:digit:]]+[[:space:]]+[[:digit:]]+[[:space:]]+[^\*]' /etc/cron.d/listupgrade; then + if grep -sq '^mailto="listupgrade-todo@' /etc/evolinux/listupgrade.cnf \ + || grep -sq -E '^[[:digit:]]+[[:space:]]+[[:digit:]]+[[:space:]]+[^\*]' /etc/cron.d/listupgrade; then # Manual upgrade process limit=$(date +%s -d "now - 180 days") else