aboutsummaryrefslogblamecommitdiff
path: root/etc/periodic/weekly/310.locate
blob: f55d2ed9280ebd43c4098633b8d1d9e1062ada74 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13

           
                                                       









                                                             
        
                                                             

                      
#!/bin/sh -
#
# $Id: 310.locate,v 1.2 1997/11/01 15:00:40 wosch Exp $
#
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