Skip to content

Commit b11a0c2

Browse files
committed
Fix script to download files
1 parent 67c63ac commit b11a0c2

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

images/taginfo/start.sh

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,15 @@ process_data() {
5050
fi
5151
}
5252

53-
get_taginfo_data() {
54-
while true
55-
do
56-
# if BUCKET_NAME is set download data
57-
if ! aws s3 ls "s3://$BUCKET_NAME/$ENVIRONMENT" 2>&1 | grep -q 'An error occurred'; then
58-
aws s3 sync s3://$AWS_S3_BUCKET/$ENVIRONMENT/ $DATADIR/
59-
fi
60-
sleep $INTERVAL_DOWNLOAD_DATA
61-
done
62-
63-
}
64-
6553
start_web() {
6654
echo "Start...Taginfo web service"
67-
get_taginfo_data
55+
if ! aws s3 ls "s3://$BUCKET_NAME/$ENVIRONMENT" 2>&1 | grep -q 'An error occurred'; then
56+
aws s3 sync s3://$AWS_S3_BUCKET/$ENVIRONMENT/ $DATADIR/
57+
fi
6858
cd $WORKDIR/taginfo/web && ./taginfo.rb
6959
}
7060

7161
ACTION=$1
72-
7362
# Overwrite the config file
7463
[[ ! -z ${OVERWRITE_CONFIG_URL} ]] && wget $OVERWRITE_CONFIG_URL -o /usr/src/app/taginfo-config.json
7564

0 commit comments

Comments
 (0)