]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - man-db/man-db.cron
c7d21ad615679f0d09a4c237073843b09be73793
[people/ms/ipfire-3.x.git] / man-db / man-db.cron
1 #! /bin/bash
2
3 renice +19 -p $$ >/dev/null 2>&1
4 ionice -c3 -p $$ >/dev/null 2>&1
5
6 LOCKFILE=/var/lock/man-db.lock
7
8 # The lockfile is not meant to be perfect, it's just in case the
9 # two man-db cron scripts get run close to each other to keep
10 # them from stepping on each other's toes. The worst that will
11 # happen is that they will temporarily corrupt the database.
12 [ -f $LOCKFILE ] && exit 0
13
14 trap "{ rm -f $LOCKFILE ; exit 0; }" EXIT
15 touch $LOCKFILE
16
17 # Create/update the mandb database.
18 mandb -q
19
20 exit 0