Benign linux Download

quickstart

Shell command-substitution syntaxDocker CLI lists running containers
SHA-256d07df87b869e15da90a048c1b86da6884fcf6f1351e07a496dfcc70b5f1bb281

Evidence

HTTP or HTTPS URL reference lines 9–14
9# the License. You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "A …
Assigns shell variable from positional parameter lines 35–79
35:2… echo
36 echo "See the document for more information:"
37 echo " https://docs.api7.ai/apisix/getting-started"
38 exit 0
39}
40
41echo_fail() {
42 printf "\e[31m✘ \e[0m$@\n"
43}
44
⋯8 lines
53ensure_docker() {
54 {
55 docker ps -q >/dev/null 2>&1
56 } || {
57 return 1
58 }
59}
60
61ensure_curl() {
62 {
63 curl -h >/dev/null 2>&1
64 } || {
65 return 1
66 }
67}
68
69retry() {
70 local attempts=$1
71 shift
72
73 local attempt=1
⋯6 lines
curl command substitution text lines 81–97
⋯5 lines
86 local code
87
88 code=$(curl --silent --output /dev/null --write-out "%{http_code}" --max-time 5 "$url") || return 1
89 [ "$code" = "200" ]
90}
⋯7 lines
HTTP URL host contains shell variable lines 104–112
104:4… cho ""
105
106 echo "Starting the container ${DEFAULT_ETCD_NAME}."
107 docker run -d \
108 --name ${DEFAULT_ETCD_NAME} \
109 --network=$DEFAULT_NET_NAME \
110 -e ALLOW_NONE_AUTHENTICATION=yes \
111 -e ETCD_ADVERTISE_CLIENT_URLS=http://${DEFAULT_ETCD_NAME}:${DEFAULT_ETCD_LISTEN_PORT} \
112 ${DEFAULT_ETCD_IMAGE_NAME}:${DEFAULT_ETCD_IMAGE_TAG} && echo_pass "etcd is listening on ${DEF …
Docker CLI executes in container lines 127–140
127:90… 2 || {
128 echo_fail "Start APISIX failed!"
129 return 1
130 }
131
132 docker exec ${DEFAULT_APP_NAME} /bin/bash -c "echo '
133apisix:
134 enable_control: true
⋯6 lines

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.