Skip to content

Commit

Permalink
fix variable interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
warroyo committed Sep 2, 2020
1 parent 38e256f commit fabc889
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ function run()
touch /etc/sysconfig/proxy
ctd_new_file="/etc/systemd/system/containerd.service.d/http-proxy.conf.new"
ctd_file="/etc/systemd/system/containerd.service.d/http-proxy.conf"
echo "creating temp containerd proxy file"
echo '[Service]' > /etc/systemd/system/containerd.service.d/http-proxy.conf.new
Expand All @@ -61,7 +58,7 @@ function run()
echo 'Environment="NO_PROXY='${TKC_NO_PROXY}'"' >> /etc/systemd/system/containerd.service.d/http-proxy.conf.new
echo "comparing containerd proxy settings"
if cmp -s "$ctd_new_file" "$ctd_file"; then
if cmp -s "/etc/systemd/system/containerd.service.d/http-proxy.conf.new" "/etc/systemd/system/containerd.service.d/http-proxy.conf"; then
echo "the containerd proxy is already set and unchanged"
else
echo "containerd proxy changed updating..."
Expand All @@ -71,9 +68,6 @@ function run()
fi
sys_file="/etc/sysconfig/proxy"
sys_new_file="/etc/sysconfig/proxy.new"
echo "creating temp system proxy file"
echo 'PROXY_ENABLED="yes"' > /etc/sysconfig/proxy.new
Expand All @@ -82,7 +76,7 @@ function run()
echo 'NO_PROXY='"'${TKC_NO_PROXY}'" >> /etc/sysconfig/proxy.new
echo "comparing system proxy settings"
if cmp -s "$sys_file" "$sys_new_file"; then
if cmp -s "/etc/sysconfig/proxy" "/etc/sysconfig/proxy.new"; then
echo "the system proxy is already set and unchanged"
else
echo "system proxy changed updating..."
Expand Down

0 comments on commit fabc889

Please sign in to comment.