summaryrefslogtreecommitdiffstats
path: root/tests/integration_base_files/lock_age.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration_base_files/lock_age.sh')
-rw-r--r--tests/integration_base_files/lock_age.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/integration_base_files/lock_age.sh b/tests/integration_base_files/lock_age.sh
new file mode 100644
index 0000000000..1808ec05df
--- /dev/null
+++ b/tests/integration_base_files/lock_age.sh
@@ -0,0 +1,16 @@
+#! /bin/bash
+if [ -a /home/integration/deploy/lock.file ]
+ then
+ DATE=$(date +%s)
+ LOCK_AGE=$(stat -c %Z /home/integration/deploy/lock.file)
+
+ AGE=$[($DATE - $LOCK_AGE)/60]
+
+ if [ "$AGE" -gt "15" ]
+ then
+ echo lock.file is $AGE min old.
+ ./cleanup.sh
+# else
+# echo lock.file is $AGE min old.
+ fi
+fi