Skip to content

Conversation

@brokep
Copy link

@brokep brokep commented Sep 5, 2023

The changes made are:

Changed MySQL-specific variables to MariaDB equivalents.
Updated the usage function to mention MariaDB.
Changed the check for /etc/init.d/mysqld to /etc/init.d/mariadb.
Changed the database reset command to use the MariaDB variables.

Also incorporated the set -e flag, which will cause the script to exit immediately if any command returns a non-zero exit code. This ensures that if something fails midway, the script won't continue to execute the rest of the commands, which could potentially lead to an inconsistent state.

Additionally, I have added logging to a temporary file, which is a great step for debugging and auditing. All STDOUT and STDERR output will now be captured, so if there's an issue, you have a place to look for clues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant