Skip to content

Commit

Permalink
mysql command now adds password to command line
Browse files Browse the repository at this point in the history
When running the `mysql` command in the entrypoint script, the
entrypoint script adds the DB password.  Commands weren't working
without it.
  • Loading branch information
akkornel committed Dec 9, 2023
1 parent 72f2e17 commit c0baecb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions root/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function usage {
echo
echo "The following commands are available:"
echo "- cron: Run the cron daemon (will not exit)"
echo "- mysql: Run the MariaDB client"
echo "- mysql: Run the MariaDB client against the DB host, as root"
echo "- restic: Run the Restic client"
}

Expand All @@ -24,7 +24,7 @@ case $1 in
exec crond -f
;;
mysql)
exec mariadb "${@:2}"
exec mariadb --password=$(cat ${DB_PASS_FILE}) "${@:2}"
;;
restic)
exec restic "${@:2}"
Expand Down

0 comments on commit c0baecb

Please sign in to comment.