
This patch set fixes outstanding issues and ease the use of the AIO when deployed behind a corporate proxy. Signed-off-by: Tin Lam <tin@irrational.io> Change-Id: Ia80cce18e6a7d3105bfed3ec423bbbd678dbe019
19 lines
644 B
Bash
Executable File
19 lines
644 B
Bash
Executable File
#!/bin/bash
|
|
set -ex
|
|
|
|
# NOTE: Use this script to perform necessary actions prior to start of the main
|
|
# deployment.
|
|
|
|
# Add the necessary corporate nameserver to systemd-resolved so it
|
|
# propagates properly and prevent it from overwriting.
|
|
# Replace 123.123.123.4 with the correct IP
|
|
: "${HTTP_PROXY:=""}"
|
|
: "${PRIVATE_NS:=""}"
|
|
if [ -n "${PRIVATE_NS}" ]; then
|
|
sudo -E sed -i -e 's/^DNS=/#DNS=/' /etc/systemd/resolved.conf
|
|
sudo -E sed -i -e "/^\[Resolve\]$/a DNS=${PRIVATE_NS}" /etc/systemd/resolved.conf
|
|
sudo rm -f /etc/resolv.conf
|
|
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
|
|
sudo systemctl restart systemd-resolved
|
|
fi
|