f84af8e70c
* add _plocate group * add locate alternative group * simple pupdatedb script that does mupdatedb and plocate-build * ship our own cron job that uses the _plocate group
8 lines
310 B
Bash
8 lines
310 B
Bash
#!/bin/sh
|
|
# pupdatedb [database directory] - update a database for plocate
|
|
set -e
|
|
dbdir=${1:-${DBDIR:-/var/lib/mlocate}}
|
|
mupdatedb -o "${dbdir}/mlocate.db"
|
|
plocate-build "${dbdir}/mlocate.db" "${dbdir}/plocate.db.new"
|
|
chgrp _plocate "${dbdir}/plocate.db.new"
|
|
mv "${dbdir}/plocate.db.new" "${dbdir}/plocate.db"
|