@@ -147,7 +147,7 @@ install_app(){
147147 proxy_enabled=$( get_proxy_enabled " $domain_names " )
148148 filename=" /tmp/library/apps/${appname} /.env"
149149 settings=$( get_settings " ${filename} " )
150- api_url=" localhost/api/apps/install"
150+ api_url=" localhost:8080 /api/apps/install"
151151 api_key=$( sudo docker exec -i websoft9-apphub apphub getconfig --section api_key --key key)
152152 request_param=$( jq -n \
153153 --arg app_name " $appname " \
@@ -169,20 +169,20 @@ install_app(){
169169 "settings": $settings
170170 }' )
171171
172- response=$( curl -s -w " \n%{http_code}" -X POST " $api_url " \
173- -H " Content-Type: application/json" \
174- -H " x-api-key: $api_key " \
175- -d " $request_param " )
172+ response=$( sudo docker exec -i websoft9-apphub sh -c " curl -s -w ' \n%{http_code}' -X POST ' $api_url ' \
173+ -H ' Content-Type: application/json' \
174+ -H ' x-api-key: $api_key ' \
175+ -d ' $request_param ' " )
176176 echo " $response "
177177
178178}
179179
180180app_list (){
181- api_url=" localhost/api/apps"
181+ api_url=" localhost:8080 /api/apps"
182182 api_key=$( sudo docker exec -i websoft9-apphub apphub getconfig --section api_key --key key)
183- response=$( curl -s -w " \n%{http_code}" -X GET " $api_url " \
184- -H " Content-Type: application/json" \
185- -H " x-api-key: $api_key " )
183+ response=$( sudo docker exec websoft9-apphub sh -c " curl -s -w ' \n%{http_code}' -X GET ' $api_url ' \
184+ -H ' Content-Type: application/json' \
185+ -H ' x-api-key: $api_key ' " )
186186 echo " $response "
187187}
188188
0 commit comments