summaryrefslogtreecommitdiffstats
path: root/adei/scripts/run-cron.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-02-21 18:44:26 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-02-21 18:44:26 +0100
commit350abf69de17b079c7589022bb0b2df01a51f84e (patch)
tree66bba94094c096b21c181d1a77c6a4ca4078482d /adei/scripts/run-cron.sh
parent3d19ce5671e45b8e06a91cb09065d81e22f9d6fd (diff)
downloadadei-350abf69de17b079c7589022bb0b2df01a51f84e.tar.gz
adei-350abf69de17b079c7589022bb0b2df01a51f84e.tar.bz2
adei-350abf69de17b079c7589022bb0b2df01a51f84e.tar.xz
adei-350abf69de17b079c7589022bb0b2df01a51f84e.zip
Use volume for apache configuration in order to run in read-only containers
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'