18 lines
331 B
Bash
Executable File
18 lines
331 B
Bash
Executable File
#!/bin/sh -
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
locdb=/var/db/locate.database
|
|
|
|
if [ -x /usr/libexec/locate.updatedb -a -f $locdb ] ; then
|
|
|
|
echo ""
|
|
echo "Rebuilding locate database:"
|
|
|
|
touch ${locdb}; chown nobody ${locdb}; chmod 644 ${locdb}
|
|
|
|
cd /
|
|
echo /usr/libexec/locate.updatedb | nice -5 su -fm nobody
|
|
chmod 444 ${locdb}
|
|
fi
|