-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix generate_config.sh premature termination on IPv6 decline #6954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…figuration Co-authored-by: DerLinkman <[email protected]>
Co-authored-by: DerLinkman <[email protected]>
| fi | ||
| else | ||
| echo -e "${YELLOW}User declined Docker update – please insert these changes manually:${NC}" | ||
| echo "${MISSING[*]}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot The original code was asking the user for permission to edit the docker daemon, if he declines it it would have printed out the needed settings for the user to manually edit within the docker daemon, this section is now removed, why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right - the informative message was removed. I've restored it in commit 5d37129.
Now when a user declines, they see:
- A message that IPv6 will be disabled for mailcow
- The missing Docker daemon settings they can add manually if they change their mind later
The key difference from the original: the script returns instead of exiting, allowing installation to continue with IPv6 disabled.
| echo "Docker restarted." | ||
| else | ||
| echo "User declined to create daemon.json – please manually merge the docker daemon with these configs:" | ||
| echo "${MISSING[*]}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot The original code was asking the user for permission to edit the docker daemon, if he declines it it would have printed out the needed settings for the user to manually edit within the docker daemon, this section is now removed, why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right - the informative message was removed. I've restored it in commit 5d37129.
Now when a user declines, they see:
- A message that IPv6 will be disabled for mailcow
- Docker version-specific settings they can add manually if they change their mind later
The key difference from the original: the script returns instead of exiting, allowing installation to continue with IPv6 disabled.
Co-authored-by: DerLinkman <[email protected]>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Contribution Guidelines
What does this PR include?
Short Description
generate_config.shterminates withexit 1when user declines IPv6 Docker configuration, leaving an emptymailcow.conf. The script should continue with IPv6 disabled instead.Root cause:
docker_daemon_edit()callsexit 1when user declines daemon.json modification, killing the entire installation process.Changes:
exit 1withreturn 1indocker_daemon_edit()(2 locations)configure_ipv6()to handle decline gracefullyENABLE_IPV6=falseand continue installation when declinedWhen users decline Docker daemon configuration, they now see:
${MISSING[*]}array showing required daemon.json settings (when updating existing file)Handles both
generate_config.sh(exportsIPV6_BOOL=false) andupdate.sh(modifies existingmailcow.conf) scenarios.Affected Containers
None. Shell script changes only.
Did you run tests?
What did you tested?
mailcow.confcompleteness and correctnessgenerate_config.shandupdate.shcode pathsWhat were the final results? (Awaited, got)
Awaited: Script completes successfully with
ENABLE_IPV6=falsein generated config, shows helpful manual configuration guidance.Got:
mailcow.confwith 57 configuration entriesENABLE_IPV6=falsecorrectly setOriginal prompt
This section details on the original issue you should resolve
<issue_title>installer ./generate_config.sh canceled after asking for docker ipv6</issue_title>
<issue_description>### Contribution guidelines
Checklist prior issue creation
Description
When running a fresh installation of mailcow-dockerized, the configuration generator (./generate_config.sh) cancels prematurely as soon as the IPv6 question is answered with “N”.
After termination, the file mailcow.conf is created but completely empty.
This behaviour persists on a clean environment and makes it impossible to proceed with the installation unless the user manually edits or recreates the configuration.
Steps to reproduce:
Fresh Debian/Ubuntu server
Clone mailcow-dockerized repository
git clone https://github.com/mailcow/mailcow-dockerized
cd mailcow-dockerized
Run the configuration generator:
./generate_config.sh
When prompted
“Do you want to enable IPv6 for Docker? [Y/n]”
→ answer “N”
Script terminates immediately
Result: mailcow.conf exists but is completely empty
Logs:
Which branch are you using?
master (stable)
Which architecture are you using?
x86_64
Operating System:
Ubuntu Server 22.04
Server/VM specifications:
16,8
Is Apparmor, SELinux or similar active?
n
Virtualization technology:
KVM
Docker version:
29.1.1
docker-compose version or docker compose version:
Docker Compose version v2.40.3
mailcow version:
2025-10a
Reverse proxy:
no
Logs of git diff:
Logs of iptables -L -vn: