[Lunar-commits] <moonbase> findutils: added daily updatedb cron job
Duncan Gibson
engelsman at lunar-linux.org
Sat Feb 12 12:41:38 CET 2011
commit dd19c7abafcc2c95d8a172b25832ae28f05d483c
Author: Christian Krause <kizkizzbangbang at googlemail.com>
Date: Sat Feb 12 12:41:38 2011 +0100
findutils: added daily updatedb cron job
---
utils/findutils/cron.daily/makeupdatedb | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/utils/findutils/cron.daily/makeupdatedb b/utils/findutils/cron.daily/makeupdatedb
new file mode 100644
index 0000000..dca95b0
--- /dev/null
+++ b/utils/findutils/cron.daily/makeupdatedb
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+LOCKFILE=/var/lock/makeupdatedb.lock
+[ -f $LOCKFILE ] && exit 0
+
+trap "{ rm -f $LOCKFILE; exit 255; }" EXIT
+touch $LOCKFILE
+updatedb
+exit 0
More information about the Lunar-commits
mailing list