From 3ba862cc90dd7c64049cffb9629f22bf12993d7d Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Sat, 18 Feb 2017 19:01:49 +0300 Subject: [PATCH] mlocate updated --- cron.daily/mlocate | 3 +++ cron.weekly/mlocate | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cron.daily/mlocate b/cron.daily/mlocate index cf42104..7f3252e 100644 --- a/cron.daily/mlocate +++ b/cron.daily/mlocate @@ -39,6 +39,9 @@ if [ -x /usr/bin/ionice ] && /usr/bin/ionice -c3 true 2>/dev/null; then /usr/bin/ionice -c${IONICE_CLASS:-2} -n${IONICE_PRIORITY:-7} -p $$ > /dev/null 2>&1 fi +# Cleanup old temp files from previous unsuccessful runs +rm -f /var/lib/mlocate/mlocate.db.* + # run the updatedb if possible if [ -x /usr/bin/updatedb ]; then /usr/bin/updatedb -f "${NODEVS}" diff --git a/cron.weekly/mlocate b/cron.weekly/mlocate index cf42104..7f3252e 100755 --- a/cron.weekly/mlocate +++ b/cron.weekly/mlocate @@ -39,6 +39,9 @@ if [ -x /usr/bin/ionice ] && /usr/bin/ionice -c3 true 2>/dev/null; then /usr/bin/ionice -c${IONICE_CLASS:-2} -n${IONICE_PRIORITY:-7} -p $$ > /dev/null 2>&1 fi +# Cleanup old temp files from previous unsuccessful runs +rm -f /var/lib/mlocate/mlocate.db.* + # run the updatedb if possible if [ -x /usr/bin/updatedb ]; then /usr/bin/updatedb -f "${NODEVS}"