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}"