diff --git a/scripts/installer.sh b/scripts/installer.sh index d7341b27d..dc80848b9 100755 --- a/scripts/installer.sh +++ b/scripts/installer.sh @@ -15,6 +15,8 @@ function log() { echo -e "$(date +'%Y-%m-%dT%H:%M:%S')" "==> installer: $1" } +export DEBIAN_FRONTEND=noninteractive + apt_ready="no" function prepare_apt_once() { [[ "${apt_ready}" == "yes" ]] && return @@ -76,10 +78,17 @@ if [[ "${ubuntu_version}" == "18.04" ]]; then exit 2 fi -# switch over to systemd -systemctl disable unbound || true -systemctl stop unbound || true -systemctl enable --now systemd-resolved +# switch over to resolved and uninstall resolvconf +if dpkg -s resolvconf 2>/dev/null >/dev/null; then + log "disabling unbound" + systemctl disable unbound || true + systemctl stop unbound || true + log "enabling systemd-resolved" + systemctl enable --now systemd-resolved + log "removing resolvconf" + prepare_apt_once + apt -y --purge remove resolvconf # purge required for dpkg -s to return error code +fi # https://docs.docker.com/engine/installation/linux/ubuntulinux/ readonly docker_version="26.0.1"