multiple locatedb update entries in /etc/cron.daily

Imre Tuske imre.tuske at gmail.com
Fri Dec 23 23:33:43 UTC 2005


Hi,


I'm using Kubuntu 5.10, and I seem to have two entries for updating the
[s]locate database in /etc/cron.daily. They are "find.notslocate" and
"slocate", and apart from the practical implementation, they both seem to be
doing about the same thing. Any opinions? (Shouldn't I remove one of these
files?)

imre


--- contents of "find.notslocate" ---
#! /bin/sh
#
# cron script to update the `locatedb' database.
#
# Written by Ian A. Murdock <imurdock at debian.org> and
#            Kevin Dalley <kevin at aimnet.com>

LOCALUSER="nobody"
export LOCALUSER
if [ -f /etc/updatedb.conf ]; then
  . /etc/updatedb.conf
fi

if getent passwd $LOCALUSER > /dev/null ; then
  cd / && nice -n ${NICE:-10} updatedb 2>/dev/null
else
  echo "User $LOCALUSER does not exist."
  exit 1
fi

--- end ---


--- contents of "slocate" ---

#! /bin/sh

if [ -x /usr/bin/slocate ]
then
    if [ -f /etc/updatedb.conf ]
    then
        /usr/bin/updatedb
    else
        /usr/bin/updatedb -f proc
    fi
    chown root.slocate /var/lib/slocate/slocate.db
fi

--- end ---


--
[ Imre Tuske | http://... | mailto:imre.tuske at gmail.com ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20051224/232cf0fb/attachment.html>


More information about the ubuntu-users mailing list