Skip to content

Commit e41e144

Browse files
committed
only hide TOKEN output with set +x
1 parent d4340ef commit e41e144

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

files/renew_token.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -xe
66
CONFIG=/usr/local/openresty/nginx/conf/nginx.conf
77
AUTH=$(grep X-Forwarded-User $CONFIG | awk '{print $4}'| uniq|tr -d "\n\r")
88

9-
set +x
9+
1010
# retry till new get new token
1111
while true; do
1212
TOKEN=$(aws ecr get-authorization-token --query 'authorizationData[*].authorizationToken' --output text)
@@ -15,6 +15,7 @@ while true; do
1515
sleep 30
1616
done
1717

18+
set +x
1819
echo $TOKEN > /usr/local/openresty/nginx/token.txt
1920
set -x
2021

0 commit comments

Comments
 (0)