3 # A Script for use in Pods... Check for status files, and validate before moving on.
5 DIR="/opt/app/aaf/status"
12 if [ -d "$DIR" ]; then
20 if [ -d "$DIR" ]; then
21 if [ -e "$DIR/$OTHER" ]; then
22 echo "$(cat $DIR/$OTHER)"
24 echo "$DIR/$OTHER does not exist"
27 echo "$DIR does not exist"
31 echo "App $APP is waiting to start until $OTHER is ready"
32 status "waiting for $OTHER"
35 while [ $n -lt 40 ]; do
38 if [ "$rv" = "ready" ]; then
39 # This is critical. Until status is literally "ready" in the status directory, no processes will start
45 echo "Sleep 10 (iteration $n)"