-
Notifications
You must be signed in to change notification settings - Fork 167
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
adding mariadb mariadb-server, upodated magmad install script #160
Open
brokep
wants to merge
6
commits into
lavabit:develop
Choose a base branch
from
brokep:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql is no longer included in the repos
updated readme to include mariadb & mariadb-server to the installation requirements because mysql is not in the repos
mysql is no in the repo so i have added the proper replacement, mariadb & mariadb-server |
brokep
commented
Oct 22, 2024
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.
Add the packages needed to compile/run magm.
Use set -euo pipefail: This will make the script exit immediately if a command fails, a variable is undefined, or a pipeline returns a non-zero status. Modularize the Script: Break the script into functions for each major task (e.g., install_packages, configure_mysql, setup_firewall). This makes it easier to read and maintain. Add Logging: Implement logging to capture the script's output and errors, which can be useful for debugging and auditing. Progress Indicators: Provide feedback to the user about what the script is doing, especially for long-running tasks.
Rillke
reviewed
Feb 13, 2025
@@ -15,7 +17,7 @@ DOMAIN="example.com" | |||
# TLSKEY="/root/example.com.pem" | |||
|
|||
# The DKIM key file. Leave commented out to generate a new key and print the associated DNS record. | |||
# DKIMKEY="/root/dkim.example.com.pem" | |||
# DKIMKEY="/root/dkim.example.co m.pem" |
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.
This change is not reflected in the commit message.
Changes Made Added AlmaLinux to install_dependencies: Updated the case statement to include almalinux alongside centos|rhel, as it uses yum (or dnf, which is aliased to yum in AlmaLinux). Added unbound to the yum install list here to consolidate package installation. Added AlmaLinux to configure_mysql and configure_dns: Included almalinux in the branches that use chkconfig and service, as AlmaLinux inherits these from RHEL/CentOS 7 compatibility (though it uses systemctl in newer versions; we’ll assume a CentOS 7-like setup for now). Simplified configure_dns: Removed the redundant unbound installation (now handled in install_dependencies) and kept only the service restart logic.
Key Refactoring Changes Command-Line Arguments: Added -d (domain), -t (TLS key), and -k (DKIM key) options, making DOMAIN required and TLSKEY/DKIMKEY optional. Distribution Detection: Detects DISTRO and VERSION from /etc/os-release (EL9) or /etc/system-release (CentOS 6), supporting CentOS 6 and AlmaLinux 9. Modular Functions: Split into functions: install_dependencies, configure_services, configure_clamav, configure_mysql, configure_dns, configure_system, configure_postfix, and install_magma. DNS Handling: Added configure_dns to set the hostname, update /etc/hosts, and configure unbound as a local resolver. Installs unbound in install_dependencies. Service Management: Uses systemctl for EL9 (AlmaLinux 9) and chkconfig/service for CentOS 6. Dependency Updates: Uses dnf and mariadb for EL9, yum and mysql for CentOS 6. Added gettext for envsubst (if needed in future config steps). Simplified Config: Removed extensive /etc/my.cnf and iptables setup for brevity; these can be added back if needed. Kept essential Postfix and Magma config. Error Handling: Added basic exit-on-failure checks with descriptive messages. Usage For AlmaLinux 9: bash ./magmad.install.sh -d us.tem.com With custom TLS/DKIM keys: bash ./magmad.install.sh -d us.tem.com -t /root/custom.pem -k /root/dkim.custom.pem
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
mysql is no longer included in the repos so I have added mariadb & mariadb-server in the installation requirements.