From d17582bc85be016810ade1ad6f98ae7e0cf84cc1 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 17 Jun 2022 16:07:56 +0300 Subject: [PATCH] MARIADB_DISABLE_UPGRADE_BACKUP to take non-empty value Like all the other environment variables. Closes #441. --- 10.10/docker-entrypoint.sh | 5 ++--- 10.3/docker-entrypoint.sh | 5 ++--- 10.4/docker-entrypoint.sh | 5 ++--- 10.5/docker-entrypoint.sh | 5 ++--- 10.6/docker-entrypoint.sh | 5 ++--- 10.7/docker-entrypoint.sh | 5 ++--- 10.8/docker-entrypoint.sh | 5 ++--- 10.9/docker-entrypoint.sh | 5 ++--- docker-entrypoint.sh | 5 ++--- 9 files changed, 18 insertions(+), 27 deletions(-) diff --git a/10.10/docker-entrypoint.sh b/10.10/docker-entrypoint.sh index b041c4c5..83cf33af 100755 --- a/10.10/docker-entrypoint.sh +++ b/10.10/docker-entrypoint.sh @@ -360,9 +360,8 @@ docker_setup_db() { # backup the mysql database docker_mariadb_backup_system() { - if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \ - && [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then - mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting" + if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then + mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting" return fi local backup_db="system_mysql_backup_unknown_version.sql.zst" diff --git a/10.3/docker-entrypoint.sh b/10.3/docker-entrypoint.sh index a7033855..733ec39a 100755 --- a/10.3/docker-entrypoint.sh +++ b/10.3/docker-entrypoint.sh @@ -360,9 +360,8 @@ docker_setup_db() { # backup the mysql database docker_mariadb_backup_system() { - if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \ - && [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then - mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting" + if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then + mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting" return fi local backup_db="system_mysql_backup_unknown_version.sql.zst" diff --git a/10.4/docker-entrypoint.sh b/10.4/docker-entrypoint.sh index a7033855..733ec39a 100755 --- a/10.4/docker-entrypoint.sh +++ b/10.4/docker-entrypoint.sh @@ -360,9 +360,8 @@ docker_setup_db() { # backup the mysql database docker_mariadb_backup_system() { - if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \ - && [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then - mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting" + if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then + mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting" return fi local backup_db="system_mysql_backup_unknown_version.sql.zst" diff --git a/10.5/docker-entrypoint.sh b/10.5/docker-entrypoint.sh index a7033855..733ec39a 100755 --- a/10.5/docker-entrypoint.sh +++ b/10.5/docker-entrypoint.sh @@ -360,9 +360,8 @@ docker_setup_db() { # backup the mysql database docker_mariadb_backup_system() { - if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \ - && [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then - mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting" + if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then + mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting" return fi local backup_db="system_mysql_backup_unknown_version.sql.zst" diff --git a/10.6/docker-entrypoint.sh b/10.6/docker-entrypoint.sh index b041c4c5..83cf33af 100755 --- a/10.6/docker-entrypoint.sh +++ b/10.6/docker-entrypoint.sh @@ -360,9 +360,8 @@ docker_setup_db() { # backup the mysql database docker_mariadb_backup_system() { - if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \ - && [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then - mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting" + if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then + mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting" return fi local backup_db="system_mysql_backup_unknown_version.sql.zst" diff --git a/10.7/docker-entrypoint.sh b/10.7/docker-entrypoint.sh index b041c4c5..83cf33af 100755 --- a/10.7/docker-entrypoint.sh +++ b/10.7/docker-entrypoint.sh @@ -360,9 +360,8 @@ docker_setup_db() { # backup the mysql database docker_mariadb_backup_system() { - if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \ - && [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then - mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting" + if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then + mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting" return fi local backup_db="system_mysql_backup_unknown_version.sql.zst" diff --git a/10.8/docker-entrypoint.sh b/10.8/docker-entrypoint.sh index b041c4c5..83cf33af 100755 --- a/10.8/docker-entrypoint.sh +++ b/10.8/docker-entrypoint.sh @@ -360,9 +360,8 @@ docker_setup_db() { # backup the mysql database docker_mariadb_backup_system() { - if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \ - && [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then - mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting" + if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then + mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting" return fi local backup_db="system_mysql_backup_unknown_version.sql.zst" diff --git a/10.9/docker-entrypoint.sh b/10.9/docker-entrypoint.sh index b041c4c5..83cf33af 100755 --- a/10.9/docker-entrypoint.sh +++ b/10.9/docker-entrypoint.sh @@ -360,9 +360,8 @@ docker_setup_db() { # backup the mysql database docker_mariadb_backup_system() { - if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \ - && [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then - mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting" + if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then + mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting" return fi local backup_db="system_mysql_backup_unknown_version.sql.zst" diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index a7033855..733ec39a 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -360,9 +360,8 @@ docker_setup_db() { # backup the mysql database docker_mariadb_backup_system() { - if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ] \ - && [ "$MARIADB_DISABLE_UPGRADE_BACKUP" = 1 ]; then - mysql_note "MariaDB upgrade backup disabled due to \$MARIADB_DISABLE_UPGRADE_BACKUP=1 setting" + if [ -n "$MARIADB_DISABLE_UPGRADE_BACKUP" ]; then + mysql_note "MariaDB upgrade backup disabled due to non-empty \$MARIADB_DISABLE_UPGRADE_BACKUP setting" return fi local backup_db="system_mysql_backup_unknown_version.sql.zst"