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
19 if [ -d "$DIR" ]; then
20 if [ -e "$DIR/$OTHER" ]; then
21 echo "$(cat $DIR/$OTHER)"
23 echo "$DIR/$OTHER does not exist"
26 echo "$DIR does not exist"
32 while [ $n -lt 40 ]; do
35 if [ "$rv" = "ready" ]; then
36 # This is critical. Until status is literally "ready" in the status directory, no processes will start
42 echo "Sleep 10 (iteration $n)"
48 if [ "sleep" = "$OTHER" ]; then
55 echo "App $APP is waiting to start until $OTHER is ready"
56 status "waiting for $OTHER"