diff --git a/templates/mariadb_backup/check_replication.erb b/templates/mariadb_backup/check_replication.erb index f133caa..8d4eab6 100755 --- a/templates/mariadb_backup/check_replication.erb +++ b/templates/mariadb_backup/check_replication.erb @@ -1,6 +1,6 @@ #!/bin/bash -result="$(docker exec mariadb_backup_mariadb_backup_1 mysql -p<%= @mysql_root_password %> -BN -e 'show status like "slave_running"')" +result="$(docker exec -u root mariadb_backup_mariadb_backup_1 mysql -p<%= @mysql_root_password %> -BN -e 'show status like "slave_running"')" if [[ "${result}" == "Slave_running ON" ]]; then echo "OK: Replica running" exit 0