Fix docker dns modification

Enhance step purge
This commit is contained in:
2020-04-17 18:58:17 +00:00
parent 7abb25ea05
commit 4b4b0531c7

View File

@@ -13,7 +13,7 @@ dockerGpgKeyUrl="https://download.docker.com/linux/ubuntu/gpg"
dockerRepoUrl="https://download.docker.com/linux/ubuntu" dockerRepoUrl="https://download.docker.com/linux/ubuntu"
dockerPackages="docker-ce docker-ce-cli containerd.io" dockerPackages="docker-ce docker-ce-cli containerd.io"
# Entry in config value $dockerDefaultConf # Entry in config value $dockerDefaultConf
dockerDnsEntry="DOCKER_OPTS=\"--dns $dockerDns1 --dns $dockerDns2\"" dockerDnsEntry=
# Get script working directory # Get script working directory
# (when called from a different directory) # (when called from a different directory)
@@ -32,6 +32,7 @@ step_config() {
echoerr " [W] User configuration \"$CONFIG_FILE\" not found. Using \"$CONFIG_FILE_DEFAULT\"" echoerr " [W] User configuration \"$CONFIG_FILE\" not found. Using \"$CONFIG_FILE_DEFAULT\""
. "$CONFIG_FILE_DEFAULT" . "$CONFIG_FILE_DEFAULT"
fi fi
dockerDnsEntry="DOCKER_OPTS=\"--dns $dockerDns1 --dns $dockerDns2\""
} }
step_1_info() { echo "Install Docker dependencies"; } step_1_info() { echo "Install Docker dependencies"; }
@@ -162,7 +163,8 @@ step_102_alias() { ALIAS="purge"; }
step_102() { step_102() {
exe read -p "Are you sure y/[n]? " answer exe read -p "Are you sure y/[n]? " answer
case $answer in case $answer in
yY) [yY])
exe service docker stop
exe rm -rf /var/lib/docker exe rm -rf /var/lib/docker
;; ;;
*) *)