3 # ============LICENSE_START====================================================
5 # ===========================================================================
6 # Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
7 # ===========================================================================
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
12 # http://www.apache.org/licenses/LICENSE-2.0
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS,
16 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 # See the License for the specific language governing permissions and
18 # limitations under the License.
19 # ============LICENSE_END====================================================
22 # A Script for use in Pods... Check for status files, and validate before moving on.
24 DIR="/opt/app/aaf/status"
31 if [ -d "$DIR" ]; then
38 if [ -d "$DIR" ]; then
39 if [ -e "$DIR/$OTHER" ]; then
40 echo "$(cat $DIR/$OTHER)"
42 echo "$DIR/$OTHER does not exist"
45 echo "$DIR does not exist"
51 while [ $n -lt 40 ]; do
54 if [ "$rv" = "ready" ]; then
59 echo "Sleep 10 (iteration $n)"
67 while [ $n -lt 40 ]; do
70 if [ "$rv" = "ready" ]; then
71 # This is critical. Until status is literally "ready" in the status directory, no processes will start
77 echo "Sleep 10 (iteration $n)"
98 echo "App $APP is waiting to start until $OTHER is ready"
99 status "waiting for $OTHER"