summaryrefslogtreecommitdiffstats
path: root/etc/periodic/weekly/310.locate
diff options
context:
space:
mode:
Diffstat (limited to 'etc/periodic/weekly/310.locate')
-rwxr-xr-xetc/periodic/weekly/310.locate18
1 files changed, 18 insertions, 0 deletions
diff --git a/etc/periodic/weekly/310.locate b/etc/periodic/weekly/310.locate
new file mode 100755
index 0000000..cfe37ff
--- /dev/null
+++ b/etc/periodic/weekly/310.locate
@@ -0,0 +1,18 @@
+#!/bin/sh -
+#
+# $Id: 310.locate,v 1.1.1.1 1997/08/12 17:51:16 pst 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}
+
+ echo /usr/libexec/locate.updatedb | nice -5 su -fm nobody 2>&1 |\
+ fgrep -v 'Permission denied'
+
+ chmod 444 ${locdb}
+fi
OpenPOWER on IntegriCloud