summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xadei/scripts/adei-branch.sh13
-rwxr-xr-xadei/scripts/run-cron.sh10
2 files changed, 10 insertions, 13 deletions
diff --git a/adei/scripts/adei-branch.sh b/adei/scripts/adei-branch.sh
index 6fa8db2..5f14c01 100755
--- a/adei/scripts/adei-branch.sh
+++ b/adei/scripts/adei-branch.sh
@@ -10,8 +10,12 @@ if [ ! -d /adei/src -o ! -d /adei/tmp -o ! -d /adei/sys -o ! -d /adei/cfg ]; th
exit 1
fi
+LOCK_FILE=.lock
+(
+ flock -x 10
+ flock -x 11
-if [ ! -f /adei/src/VERSION ]; then
+ if [ ! -f /adei/src/VERSION ]; then
bzr branch -r $ADEI_REVISION --use-existing-dir http://darksoft.org/bzr/adei/trunk/ /adei/src
(
cd /adei/src
@@ -33,9 +37,9 @@ if [ ! -f /adei/src/VERSION ]; then
ln -s ../cfg/config.actual.php config.actual.php
ln -s ../cfg/config.override.php config.override.php
)
-fi
+ fi
-(
+ (
cd /adei/src
for setup in $ADEI_ENABLED_SETUPS $ADEI_SETUP; do
if [[ ! -a setups/$setup ]]; then
@@ -48,4 +52,5 @@ fi
ln -s ../../cfg/$setup setups/$setup
fi
done
-)
+ )
+) 10> /adei/cfg/$LOCK_FILE 11> /adei/src/$LOCK_FILE
diff --git a/adei/scripts/run-cron.sh b/adei/scripts/run-cron.sh
index f0539f6..5f4b9e2 100755
--- a/adei/scripts/run-cron.sh
+++ b/adei/scripts/run-cron.sh
@@ -2,14 +2,6 @@
printenv | grep -v affinity:container | sed -r 's/^(.*)=("?)(.*)\2$/export \1="\3"/g' > /adei/env
-LOCK_FILE=.lock
-(
- flock -x 10
- flock -x 11
-
- /opt/scripts/adei-branch.sh
-
-) 10> /adei/cfg/$LOCK_FILE 11> /adei/src/$LOCK_FILE
-
+/opt/scripts/adei-branch.sh
cron -n -m '/usr/bin/procmail -d root'