mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-09-27 05:07:14 +00:00
ip6_controller: moved docker major detection upwards
This commit is contained in:
@@ -18,6 +18,7 @@ get_ipv6_support() {
|
|||||||
# 2) Ensure Docker daemon.json has (or create) the required IPv6 settings
|
# 2) Ensure Docker daemon.json has (or create) the required IPv6 settings
|
||||||
docker_daemon_edit(){
|
docker_daemon_edit(){
|
||||||
DOCKER_DAEMON_CONFIG="/etc/docker/daemon.json"
|
DOCKER_DAEMON_CONFIG="/etc/docker/daemon.json"
|
||||||
|
DOCKER_MAJOR=$(docker version --format '{{.Server.Version}}' 2>/dev/null | cut -d. -f1)
|
||||||
MISSING=()
|
MISSING=()
|
||||||
|
|
||||||
_has_kv() { grep -Eq "\"$1\"\s*:\s*$2" "$DOCKER_DAEMON_CONFIG" 2>/dev/null; }
|
_has_kv() { grep -Eq "\"$1\"\s*:\s*$2" "$DOCKER_DAEMON_CONFIG" 2>/dev/null; }
|
||||||
@@ -87,7 +88,6 @@ docker_daemon_edit(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $ans =~ ^[Yy]$ ]]; then
|
if [[ $ans =~ ^[Yy]$ ]]; then
|
||||||
DOCKER_MAJOR=$(docker version --format '{{.Server.Version}}' 2>/dev/null | cut -d. -f1)
|
|
||||||
if [[ -n "$DOCKER_MAJOR" && "$DOCKER_MAJOR" -lt 27 ]]; then
|
if [[ -n "$DOCKER_MAJOR" && "$DOCKER_MAJOR" -lt 27 ]]; then
|
||||||
cat > "$DOCKER_DAEMON_CONFIG" <<EOF
|
cat > "$DOCKER_DAEMON_CONFIG" <<EOF
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user