summaryrefslogtreecommitdiffstats
path: root/tests/integration_base_files/lock_age.sh
blob: 1808ec05dfe3f6833c0eca284cbc29283f094f0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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