mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
16
config/findutils/updatedb
Normal file
16
config/findutils/updatedb
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
[ -x "/usr/bin/updatedb" ] || exit 0
|
||||
|
||||
LOCKFILE="/var/lib/locate/updatedb.lock"
|
||||
|
||||
trap "rm -f $LOCKFILE" EXIT
|
||||
|
||||
if [ -e "$LOCKFILE" ]; then
|
||||
echo >&2 "Warning: $LOCKFILE present, not running updatedb."
|
||||
exit 1
|
||||
else
|
||||
touch "$LOCKFILE"
|
||||
fi
|
||||
|
||||
exec /usr/bin/updatedb
|
||||
Reference in New Issue
Block a user