Skip to content
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

Improved the FQDN check and Ask before changing Git Repository URL in "update.sh" #5401

Merged
merged 6 commits into from
Oct 5, 2023

Conversation

AlexHuebi
Copy link
Contributor

I've added a check for if the last letter in MAILCOW_HOSTNAME is a dot (because if there is one, Postfix doesn't start.

I've also added a bypass if the case in #1572 (starting the updater while no subdomain is set eg. "example.org" instead of "mail.example.org") is met.
The user has to confirm the Message (as seen in the commit) with a link to the issue.

A better way would be to use a Regex for the check, but as seen here https://stackoverflow.com/a/26618995 , may require a much larger codechange.

@dkpost3
Copy link

dkpost3 commented Sep 10, 2023

image

@AlexHuebi
Copy link
Contributor Author

I've created a VM where a Mailcow instance was set up, but I am not able to recreate that error. Did you change anything that is not in the .gitignore?
And how did you get to this point? Because I had to modify the update.sh in my repository (as seen in the 2nd commit that should be probably removed before merge) so it wont change itself back to the mailcow/mailcow-dockerized repo.

@AlexHuebi
Copy link
Contributor Author

Note: I've now also modified the part where it says # Silently fixing remote url from andryyy to mailcow and now its asking before changing it back to the default repository

@AlexHuebi AlexHuebi changed the title Improved the FQDN check in "update.sh" Improved the FQDN check in "update.sh" and Ask before changing Git Repository URL Sep 11, 2023
@AlexHuebi AlexHuebi changed the title Improved the FQDN check in "update.sh" and Ask before changing Git Repository URL Improved the FQDN check and Ask before changing Git Repository URL in "update.sh" Sep 11, 2023
Copy link
Member

@DerLinkman DerLinkman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me but need to test it. But don't have time at the moment.

Copy link
Member

@DerLinkman DerLinkman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Looks good. Just tweaked it a bit to be more colorful and vibrant to notice the users even better.

I also added the DOT Check to the generate_config.sh as it was used their as well (the old version).

@DerLinkman DerLinkman merged commit 1c403a6 into mailcow:staging Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants