mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
17 lines
266 B
Bash
17 lines
266 B
Bash
#!/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
|
|
|
|
/usr/bin/updatedb
|