Debian Codegraph @

contrib/drivers/k8s_opensuse_v1/templates/fragments/add-proxy.sh

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2
3 . /etc/sysconfig/heat-paramsscip-shell source . . `/etc/sysconfig/heat-params`.
4
5 DOCKER_PROXY_CONF=/etc/systemd/system/docker.service.d/proxy.confscip-shell filesystem . . `/etc/systemd/system/docker.service.d/proxy.conf`.
6 BASH_RC=/etc/bashrcscip-shell filesystem . . `/etc/bashrc`.
7
8 mkdirscip-shell system . . mkdir. -p /etc/systemd/system/docker.service.dscip-shell filesystem . . `/etc/systemd/system/docker.service.d`.
9
10 if [scip-shell system . . `[`. -n "$HTTP_PROXY" ]; then
11 catscip-shell system . . cat. <<EOF | sedscip-shell system . . sed. "s/^ *//" > $DOCKER_PROXY_CONF
12 [Service]
13 Environment=HTTP_PROXY=$HTTP_PROXY
14 EOF
15
16 systemctl daemon-reload
17 systemctl --no-block restart docker.service
18
19 if [scip-shell system . . `[`. -f "$BASH_RC" ]; then
20 echoscip-shell system . . echo. "declare -x http_proxy=$HTTP_PROXY" >> $BASH_RC
21 else
22 echoscip-shell system . . echo. "File $BASH_RC does not exist, not setting http_proxy"
23 fi
24 fi
25
26 if [scip-shell system . . `[`. -n "$HTTPS_PROXY" ]; then
27 if [scip-shell system . . `[`. -f "$BASH_RC" ]; then
28 echoscip-shell system . . echo. "declare -x https_proxy=$HTTPS_PROXY" >> $BASH_RC
29 else
30 echoscip-shell system . . echo. "File $BASH_RC does not exist, not setting https_proxy"
31 fi
32 fi
33
34 if [scip-shell system . . `[`. -n "$NO_PROXY" ]; then
35 if [scip-shell system . . `[`. -f "$BASH_RC" ]; then
36 echoscip-shell system . . echo. "declare -x no_proxy=$NO_PROXY" >> $BASH_RC
37 else
38 echoscip-shell system . . echo. "File $BASH_RC does not exist, not setting no_proxy"
39 fi
40 fi