[Debian-live-changes] r1376 - dists/trunk/live-webbuilder
Daniel Baumann
daniel at alioth.debian.org
Mon May 7 20:01:34 UTC 2007
Author: daniel
Date: 2007-05-07 20:01:33 +0000 (Mon, 07 May 2007)
New Revision: 1376
Modified:
dists/trunk/live-webbuilder/cron-webbuilder
Log:
Modified: dists/trunk/live-webbuilder/cron-webbuilder
===================================================================
--- dists/trunk/live-webbuilder/cron-webbuilder 2007-05-07 19:58:33 UTC (rev 1375)
+++ dists/trunk/live-webbuilder/cron-webbuilder 2007-05-07 20:01:33 UTC (rev 1376)
@@ -18,17 +18,19 @@
TEMPDIR="/tmp"
MAILER=""
-# Check for webbuilder-cron.sh already running
-if [ ! -f "${TEMPDIR}"/lwb-lock ]
+# Checking lock file
+if [ -f /var/lock/live-webbuilder ]
then
- touch "${TEMPDIR}"/lwb-lock
-else
- echo "E: webbuilder-cron.sh already running according to lock file."
+ echo "E: live-webbuilder already/still running."
exit 1
fi
-# The LWB_LIST is the listing of live-webbuilder files waiting
+# Creating lock trap
+trap "test -f /var/lock/live-webbuilder && rm -f /var/lock/live-webbuilder; exit 0" 0 1 2 3 9 15
+# Creating lock file
+touch /var/lock/live-webbuilder
+
# Ok from here spin through the live-webbuilder files we have waiting to build
for LWB in "${TEMPDIR}"/*.lwb
do
@@ -74,6 +76,3 @@
fi
done
-
-# Remove the lock file if we get here.
-rm "${TEMPDIR}"/lwb-lock
More information about the Debian-live-changes
mailing list