summaryrefslogtreecommitdiffstats
path: root/adei/scripts/run-cron.sh
diff options
context:
space:
mode:
Diffstat (limited to 'adei/scripts/run-cron.sh')
-rwxr-xr-xadei/scripts/run-cron.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/adei/scripts/run-cron.sh b/adei/scripts/run-cron.sh
index 5f4b9e2..f0539f6 100755
--- a/adei/scripts/run-cron.sh
+++ b/adei/scripts/run-cron.sh
@@ -2,6 +2,14 @@
printenv | grep -v affinity:container | sed -r 's/^(.*)=("?)(.*)\2$/export \1="\3"/g' > /adei/env
-/opt/scripts/adei-branch.sh
+LOCK_FILE=.lock
+(
+ flock -x 10
+ flock -x 11
+
+ /opt/scripts/adei-branch.sh
+
+) 10> /adei/cfg/$LOCK_FILE 11> /adei/src/$LOCK_FILE
+
cron -n -m '/usr/bin/procmail -d root'