Skip to content

Commit

Permalink
install_app
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaofeng1227 committed Dec 7, 2023
1 parent ecb9f62 commit fb0f9d3
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions scripts/install_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,14 @@ response=$(curl -s -w "%{http_code}" -X POST "$api_url" \
-d "$request_param")

echo "$response"
http_code=$(echo "$response" | tail -n1)
response_body=$(echo "$response" | head -n -1)
echo "------------------------------"
# http_code=$(echo "$response" | tail -n1)
# response_body=$(echo "$response" | head -n -1)

if [ "$http_code" -eq 200 ]; then
sudo docker ps -a |grep "$appid"
else
error_message=$(echo "$response_body" | jq -r '.message')
error_details=$(echo "$response_body" | jq -r '.details')
echo "Error: $error_message, Details: $error_details"
fi
# if [ "$http_code" -eq 200 ]; then
# sudo docker ps -a |grep "$appid"
# else
# error_message=$(echo "$response_body" | jq -r '.message')
# error_details=$(echo "$response_body" | jq -r '.details')
# echo "Error: $error_message, Details: $error_details"
# fi

0 comments on commit fb0f9d3

Please sign in to comment.