summaryrefslogtreecommitdiff
path: root/files/common/etc/splash.sh
diff options
context:
space:
mode:
Diffstat (limited to 'files/common/etc/splash.sh')
-rw-r--r--files/common/etc/splash.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/files/common/etc/splash.sh b/files/common/etc/splash.sh
new file mode 100644
index 0000000..b56ddb5
--- /dev/null
+++ b/files/common/etc/splash.sh
@@ -0,0 +1,18 @@
+timeout=6000
+chain_prefix=splash_db_
+chain_id_file=/tmp/splash_chain_id
+
+chain_id=$(cat $chain_id_file 2>/dev/null || true)
+if ! [ "$chain_id" -gt 0 ] &>/dev/null; then
+ chain_id=1
+ echo $chain_id > $chain_id_file
+fi
+
+lockSplash () {
+ exec 666<$chain_id_file
+ flock -x 666
+}
+
+unlockSplash () {
+ exec 666<&-
+}
contact: Jan Huwald // Impressum