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
40 echo "Sleep 10 (iteration $n)"
48 while [ $n -lt 40 ]; do
51 if [ "$rv" = "ready" ]; then
52 # This is critical. Until status is literally "ready" in the status directory, no processes will start
58 echo "Sleep 10 (iteration $n)"
79 echo "App $APP is waiting to start until $OTHER is ready"
80 status "waiting for $OTHER"